Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.

Get Started
Asked — Edited

Review Led Options

I can not longer use the BlinkM for Alan's eyes as they have modified the hardware and voltage requirements etc. so I'm looking for other options. The neopixels blaster would be perfect but looks like it's not on the production line yet.

...I'm really only looking at trying to get ez Builder to control a single neopixels color cycle, fade, brightness, control on and off. I'd like to be able to use sliders like the blink M control (rgb ). Any ideas or other options I'm overlooking?

AI Support Bot
Related Content
Synthiam
PRO
Synthiam
#20  
Again, you have to send a command to each neo pixel because they are addressed within the serial connection, starting at 0x00 to 0x01 and 0x02 so on
PRO
USA
#21  
As far as I know 'neopixel' is a product line produced by Adafruit. You had asked how they differ from RGB LED's.

If you look at that sketch you define your neopixel type with this line

Code:


// Constructor - calls base-class constructor to initialize strip
NeoPatterns(uint16_t pixels, uint8_t pin, uint8_t type, void (*callback)())
:Adafruit_NeoPixel(pixels, pin, type)


Maybe you can just enter a 1 there for pixels. Then you could use the fade function tailored to your needs to control that one pixel.

Code:


// Initialize for a Fade
void Fade(uint32_t color1, uint32_t color2, uint16_t steps, uint8_t interval, direction dir = FORWARD)
{
ActivePattern = FADE;
Interval = interval;
TotalSteps = steps;
Color1 = color1;
Color2 = color2;
Index = 0;
Direction = dir;
}

// Update the Fade Pattern
void FadeUpdate()


I would need to research this combo to get it to work but I would start there. Realize this is not my script and I did not write the tutorial.

Perry
PRO
USA
#22  
OK i could not find the call for number of pixels. Got it, in the constructor. I see setting for pixel number and which pin its on, do you know what "type" means, i've not seen that in a sketch before.

Sorry i thought you had written up that tut. But that is exactly the two functions , color and fade i'm looking to adjust. I'll look into it further.

@DJ, Got it! Thanks.
PRO
USA
#23  
'type' refers to the type of LED's in the strip. RGB or RGBW are options. There are codes provided by Adafruit that I put in there. They came from their tutorial page.
PRO
USA
#24  
I took a look in the Arduino IDE and it looks pretty easy to figure out. There are some test codes in there.

Code:


// Parameter 1 = number of pixels in strip
// Parameter 2 = Arduino pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
// NEO_KHZ400 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
// NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products)
// NEO_RGB Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
// NEO_RGBW Pixels are wired for RGBW bitstream (NeoPixel RGBW products)
Adafruit_NeoPixel strip = Adafruit_NeoPixel(60, PIN, NEO_GRB + NEO_KHZ800);


Those are all the parameters to set it up. I infer from this that you probable could make it a 2 LED strip with left eye being 1 and the right eye 2 since the Flora LED's can be daisy chained.

There may be easier ways to do this. Would be nice to go directly from EZB to a neopixel without intermediate hardware.
PRO
USA
#25  
Easier. Hahah yeah its called the Pixel Blaster (not yet in production). I think its because of the very finicky timing involved with neopixels.

I'm spending way too much time on this as its just his eyes but so much of who he is, is in the color of his eyes. I like to attach emotional responses to the eyes and color. The BlinkM was perfect for this.

I just went to Frys electronics and got a few regular RGB LEDs and I cant get them to exhibit the same brightness and smooth transistion with PWM as I get with a neopixel or the BlinkM.

I have a few Gemmas here to play with, But I"ll order the Flora Pro because they are so dang powerful in a small size. I'm going to start with the mobile example that PTP sent through earlier today.
PRO
Synthiam
#26  
Neo blaster is not in development. It works fine and has been completed for over a year. It's in queue for manufacturing - when there's room from revolution. See other thread regarding diy sales volume challenges :(. Off topic for this thread. I obviously support diy as much as I can on the forum directly to you all. It's manufacturing new items that is difficult to justify financially to those responsible for budgets.

However, you can see the neopixel blaster working on its manual page. Access manual pages in the learn section or by pressing the question mark on the control in ARC.

There will always have the need for hardware to control neopixel units. This is due to timing constraints - and why there are so many neopixel controllers. Or, the easiest is to simply use an arduino. Maybe a teensy or one of the super tine arduinos, if the CPU is fast enough for the timing.
PRO
USA
#27  
Absolutely not bashing the blaster not being ready for consumer consumption. I’ve been sitting waiting since it announced about a year ago?!.. Patiently. But it is torture to see video of it working and see it implemented in ARC, and not know when or if it will be produced. For me, it better I not know it even excists! Lol! Can I get hypnotized?! you’ve never seen the pixel blaster.....

Maybe preorder DIY items, hire out someone to make the boards by hand in batches of 100. That way the wait time is shorter and no production overhead. Might be better than a kickstarter because let’s face it your DIY guys are here in this forum. That way you wouldn’t have to give Kickstarter a % of your profits. I wouldn’t mind paying a higher price to get items on the coming soon’ to help pay for manufacturing.

But back on topic I will use a ardurino comparable board for this and swap out when the pixel blaster becomes available ;)
#28  
@DJ Just a thought, what if those LEDs were encased in EZBits so they are part of the Revolution extras and so educators could add them to robots easily. DIYers could just take them out of the EZBit case.
PRO
USA
#29  
Everything I see in the 'Coming soon' section I believe could be used for the Revolution. Certainly would be difficult to disprove to the money people otherwise. Its DIY without the case and Revolution with the case.
#30  
The Arduino code I hacked together ages and updated not too long ago can address from 1 to 24 neopixel as is. You can use a serial interface to set individual pixels to RGB color values or use the preprogrammed patterns and color fades. The color fades may be useful to you. They do make a new addressable LED that is generally known as dot star which the ez-b should be able to control directly, it has both a clock line and a data line so it is not timing dependent. I have only seen them in strings or boards so far. Programming for dotstars would take a bit of work but should not require an Arduino.
PRO
USA
#31  
I actually have a meter of Dot stars, but have no idea how to write code for them.

I may have a few questions for you as I progress. You mind if I bug you ?
#32  
Don't know how much I can help. I don't have any myself. I have just be reading up on them a little. As they are interesting for Persistence of Vision projects and I have always wanted to make a persistence of vision device.

Links for reference on the Dotstars are:

https://cdn-shop.adafruit.com/product-files/2343/APA102C.pdf

I ran across a blog that addressed programing them a little at:

https://cpldcpu.com/2014/11/30/understanding-the-apa102-superled/

There is an arduino library to use them available thru adafruit. Or an LED driver library called FASTLED. Just post here and I will reply with whatever help I can give.
PRO
USA
#33  
....sorry i wasn't clear...i meant if i choose the neopixel route and use the code your wrote.
#34  
Either myself or CochranRobotics can help with the neopixels. I was thinking that my code for the neopixel ring could be modified to function with the dotstar light strips using the same commands as it uses for neopixels.
PRO
USA
#35  
That would be cool. I looked into the links you sent and would be nice to do away with an inbetween board and be able to go straight to the EZB.
#36  
The issue with using the EZ-B to drive a dostar string directly might be speed. I don’t know how many dotstar leds you could drive with a reasonable amount of speed. You would need to use two pins to control the dotstar leds. One pin would be the clock pin. The other pin is the data pin. To start a transaction with the dotstars you need to set the data pin low then pulse the clock pin from low to high and back to low 32 times. This is the start frame. The next comes what the documentation calls an LED frames. One frame for each led in the string. Once all of the dotstar led have each received a frame an ending frame needs to be sent. This means setting the data pin to high and pulsing the clock pin from low to high and back to low 32 times. Have to look up the data pattern for the LED frames but each LED frame is 32 bits. So send 32 bits for each LED frame. From what I gather there are some variation in dotstar LEDs. They do not all you the same color order. The first 8 bits of the LED frames address a global register that affects all three colors. The next 24 bits may vary but it is 8 bits for each color. The color order varies. For example some are RED, GREEN, BLUE; Some are BLUE, GREEN, RED, etc. So it will take some tinkering to figure out what the color pattern is. Lots of bit bashing as it called to make it work. But definitely doable. For each of the 32 bits in an LED frame the clock pin must be pulsed from high to low then back to high.

I wish I knew how to make plugins. Seems to me that a plug-in could do most of the work.
PRO
USA
#37  
Yes I agree a plug in would be great.

In the mean time I’m back to the neopixels. I’m going to load up the code from tutorials page onto a Adafruit Gemma (ardurino mini) I have and test to see if I can do what I want ( color fade, almost like a 2 color rainbow) with sliders.
#38  
The Adafruit Gemma is not the same as arduino mini. There is actual a product called the arduino mini.

The Adafruit Gemma does not have a standard serial port available. The fix is to use the arduino "SoftwareSerial Library". Be sure to assign the Serial Port pin in the code with the SoftwareSerial Library on the original Gemma.

The Adafruit Gemma M0 does have standard serial ports available. Not sure how the serial interface works on the Gemma M0. I don't have one. There should be documentation on it somewhere on the Adafruit site.

I have not tinkered with the arduino mini serial port setup so I can't give you any hints on it. should be documentation on using serial ports with it as well.

Just be sure you modify the pins correctly in the code for what you need.
PRO
USA
#39  
Glad i didnt get to it today. I had not looked closer at the Gemma. I just ordered the Pro Trinket. Its about as big as i can go in the space I have. Seems full featured, has the same ATmega as the uno. But you are limited to about 28k in code size.


https://www.adafruit.com/product/2000