what I am trying to do is to control an RGB LED strip via bluetooth with the netduino. So far I got the grove Bluetooth Serial shield working in just a few seconds and can control 3 Leds on the Netduino with PWM. after this good experince I liked the approach using the grove LED driver to control mutiple RGBs by just using 2 pins of the netduino (From the SDA and SCL to 6 and 7, and later on to 7 and 8). I was very happy to see that this LED strip driver follows the same API as the grove LED so I could follow this tutorial:
(note: I wanted to put in here the link but as a new user I am not allowed to. It was the Turotial by tim mattision on his blog. You can find this tutorial by google entering “How-To: Write a Netduino driver for the Grove chainable RGB LED”)
But it didn’t work. So I changed the pins on the netduino, then I thought, maybe i have clock and data wrong and I changed that, then the rgb was white, instead of red what i was sending.
I tried 5V instead of 3.3v as it was written that both are accepted. But nothing happend. After that I downloaded the driver for ardunio and rewrote it into C# but still the same problem: only some odd blinking in diferent color, which I do not send. I changed also the waiting times in the bitsending stepwise from 0 up to 20000 but still no luck.
I have also added to the ouputs 2 LEDs and slowed the tranmission so I can see what would be sended and that seemed for me ok.
I also checked the P9813 datasheet, but did not get any better idea.
Does any one have an idea or did this LED strip driven by a netduino 2 and could share me the pins he used and maybe the code that runs for him?
Which one is the correct voltage ? 3.3V or 5V?
Below please find the actual code I rewrote from the Arduino driver for the RGB Led. The stuff that is comment out is the original ardino stuff. And I replaced uint_8 with byte and uint_32 with Uint32.
The result i get with this code is a very odd sometime blinking instead of a smoth rising of each color.
thanks for the help in advance