Welcome Guest! To enable all features please Login or Register.
Options
Go to last post Go to first unread
fasasoftware@gmail.com  
#1 Posted : Wednesday, February 24, 2016 11:25:29 AM(UTC)
fasasoftware@gmail.com

Rank: Advanced Member

Groups: BetaUser, Registered
Joined: 12/28/2015(UTC)
Posts: 31

Was thanked: 18 time(s) in 18 post(s)
Dear Admin,

I'm trying to work with a "BMP180" Barometric shield and an Arduino Nano 3.1 Chinese(very Good!!!).....My Goal is to pilot this hardware and drive 2 LED RGB....When the Wheather is Good The led rgb goes Green with brithness from 0 to 255 always changing...and also for the other colors, then, If the Wheather is BAD, the led rgb goes red, and then if the wheather is half not good , neither bad ...the led rgb color must became blue....

I know.....i should make a custom node....but how??? There's already a sparkfun "BMP180" library...
Ok... i need to copy and paste some line from that example library..But How?

I should make in the custom node an output activaction...But how i can pilot the 2 led rgb colors and brightness with one custom node, i think with 3 different output activaction and set like an if statment in the custom node to test if the hpascal= 960 is bad Wheather and hpascal 1040 for good Wheather, and in the middle the wheather is neither good and neither bad....????

I have now this configuaration:
LED1:
1)D3-RED
2)D5-GREEN
3)D6-BLUE

LED2:
1)D9-RED
2)D10-GREEN
3)D11-BLUE

Please...Can You Help Me With a Simple example code??? Thank you a lot in advance...Best regards,
LestrosoBlushing
thanks 1 user thanked fasasoftware@gmail.com for this useful post.
sample@email.tst on 4/7/2024(UTC)
EmbrioAdmin  
#2 Posted : Thursday, February 25, 2016 2:56:44 PM(UTC)
EmbrioAdmin

Rank: Administration

Groups: Administrators
Joined: 12/11/2014(UTC)
Posts: 661

Thanks: 1 times
Was thanked: 109 time(s) in 104 post(s)
Hi Lestroso,

Have you looked through this tutorial? http://embrio.io/project...ts/color-fading-rgb-leds

It explains how to control RBG leds by controlling each pin. Does that work with your setup or is there a special interface for your RGB leds?

For the pressure sensor you'd make something kind of like this:



You want your custom nodes to do as little as possible, in this case just read the temperature. This node should be running on it's own agent with a refresh rate of 1. You'll also want to make sure to check the timing of this node in the profiler. It's bad to use "delay" in an Embrio node, but this kind of hardware needs it.

You could make another similar node and agent for pressure. Your LED agents will want to be updating faster, probably 32 times per second. If the temp and pressure readings take too long that might limit how fast your should set the LED agents. (In the near future there will be tools to help visualize this, for now you have to look at the profiler tab.)

Let me know how it goes!
thanks 1 user thanked EmbrioAdmin for this useful post.
sample@email.tst on 4/7/2024(UTC)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Notification

Icon
Error