
Redzone
USA
Asked
— Edited

Hello all,
Has anyone used a NeoPixel Ring before. I can't figure out how to wire it or connect it to EZB. Here is a link to the NeoPixel Ring site it has a data sheet. http://www.adafruit.com/product/1586
I have look at the I2C but not sure what address or how it is wired.
Thank you.
The ring I think would be to pin 6 on the arduino for signal and provide power to the ring. I read something about the power should be from the same source as the arduino. This could come off of the arduino if you would like.
Dave, has the code you posted been tested? I was sending the command thru the Arduino serial monitor, should work there. I will try and send it thru the EZB.
Not at all. I dont even have an arduino yet. It should be here soon. The neopixel may be a week out or so. This was more of a conversation to get ideas in a topic that already existed. Read post #12.
Robert, what do you think about this. The V4 could set an arduino pin to high which would then be caught in the loop and kick the arduino code to a function that is looking for a serial connection to get the new values. The trigger port would be set to low again by the V4 and the arduino would see this and start the loop again using those color settings.
OK. Here's where I am at running a Neo Pixel Ring off of the EZBv4. I have to say right up front that what I am going to post is the work of our friend Luis Vazquez who has guided me thru get the ring up and running.
Connection between the EZB and the Arduino
Digital Port 18 (TX) to RX on the Arduino Digital Port 19 (RX) to TX on theArduino These are used as UART2 Connect a ground wire between the EZB and the Arduino:
Note; You can't upload a script to the Arduino with EZB powered up.
Arduino script:
Makes sure you have the library for it.
You should be able to send it commands thru the Arduino Serial Monitor by entering the (ASCII Character). For example in the code above enter "B" or 66 and the Blue colorwipe should run.
To send the commands via the EZB.
Create an initialization script and have it run when you connect to the EZB
Create a script to send the commands to the Arduino, for example, this will run the Blue colorswipe, once.
To run it multiple times you can put it in a loop.
I have found the script hard to control, for example, running in a loop if you push stop it will still run for awhile.
What I am trying to achieve is a pulsing effect that can be changed to different colors, when needed. Kind of like a mood indicator. If anyone can help out there help with a script for that, it would be great. Once again thanks Luis for all your help.
The problem is that the loops that change pixel colors have delays in them and the arduino is busy in those loops and not checking the serial port for new commands. I have seen a few notes on the subject on the Internet. It is what I meant when I said I was not sure how responsive the arduino would be to serial commands. There is a way to write it that will work. There are some articles on adafruit about multitasking an arduino which help explain the way to do it. When I get time I will see if I can whip up something close to what you need as an example.
Luis is a probably better at this stuff than I am, but we all have different things we have worked with. I have been playing with neopixels for some projects lately. I made a guggenhat a while back that mixes neopixels with serial input that has the fixes in it you need.
Couldn't you check for the pin state in the inner loops which would make it check every 50 ms? If the pin is high, jump out. Basically at that point you could set another pin high but in the opposite direction. The v4 could be set to watch for that pin to go high and start the serial write. When it is done, the v4 could set the first pin back to low. You get the idea. The unique thing here is that there are many different ports to handle flags passed back and forth between the two devices.
if you want to work on it, thate great. I will be working on it as soon as I can. I like learning new stuff.
If you want to look into using digital signals to interrupt the loops the arduino does actually support interrupts. The same adafruit multitasking an arduino tutorials actually talk about using signals pins to interrupt loops. They are a good read.
https://learn.adafruit.com/multi-tasking-the-arduino-part-1
https://learn.adafruit.com/multi-tasking-the-arduino-part-2
https://learn.adafruit.com/multi-tasking-the-arduino-part-3
I think part 3 has a lot of the fix you need but it has been a bit since I read thru them. In part 3 they get rid of the delays in the loops. The code in part 3 uses push buttons to change operations, but a serial input could be used instead. If you really want to use up digital pins on the ez-b you could use the button code as is.