
Perry_S
USA
Asked
— Edited
Trying to work through the neopixel tutorial. Is this working for others? I can't get the Arduino sketch to compile with new and old versions of IDE.
Is this working for others or is the problem on my end.
Thanks
To use the neopixel, there are commands at the top of the sketch. These would be sent from the EZ-B to the arduino.
If you change the pin on the Arduino that is connecting to the NeoPixel, you need to adjust line 317 I think. I would have to dig through to make sure.
The baud rate for the arduino is set to 9600.
To test you can use this script if configured like I have described.
I have to step away for a bit. I will continue when I can
One more thing to mention... Line 317 also contains the number of pixels in the NeoPixel. If you have 8, the first number should be 8. If you have 16, the first number should be 16. Same with 24 and so on.
I did load this onto a new arduino mini pro using the information provided above, and then tested it in the Serial Monitor in Arduino. It worked by sending the commands at the top of the sketch. I then connected to a digital port on the EZ-B (in my case D0 to try something other than D5) and it worked by sending the commands via a script as shown above but replacing D5 with D0.
I think that there is a newer version of the script that uses newer Arduino stuff and newer NeoPixel libraries, but I haven't spent any time with them.
If you try the above steps and have any issues, let me know and I will help where I can.
Thanks David
One more test that I did just now...
I updated the NeoPixel library through the Sketch, Include Library, Manage Library menu option.
The new library (1.1.1) also still works with the NeoPixel and the sketch provided above, so it isn't necessary to stay at the older 1.0.4 version of the NeoPixel library for this to work.
I made a plugin a while back for the NeoPixel. It will give you the language of the script command that belongs in the quotes.
You can leave the arduino hooked up to the usb port and test some things out using it if you want to see how the NeoPixel reacts to the commands. You can also leave it disconnected and just use this to get the format of the commands.
To see the commands being sent to the NeoPixel, set the com port and then the number of pixels in the neopixel through the config page of the plugin.
From there, select the mode, and fill out the other fields that are enabled after selecting the mode. Click the Check mark at the bottom of the form if you want the command to be sent to the com port you specified to see the results of the settings you chose. Again, you don't have to have the connection established though to see the command that would go into the script for that action to be sent to the NeoPixel. It is just nice to also be able to see what that command looks like.
The bottom text box will display the command that you would enter into your script for this action.
https://synthiam.com/redirect/legacy?table=plugin&id=76 is the link to the plugin.
Thanks David. I know you are busy so it is nice that you could spend a little time on this. I will be back at it tonight after work trying to make this work. I feel I am close.
I have had a bit more time to play around with this.
I loaded Arduino 1.8.3 and then loaded the project that RobertL184 provided to allow this to work with new versions of Arduino. https://synthiam.com/Community/Questions/6767&page=7 post #67
When compiling, I get an error with the ColorWipe portion. Everything does compile and load to the Arduino Mini Pro. I was able to test all of the commands via the Arduino Serial Monitor and everything worked except for the Wipe portion. I will see if I can figure it out. If not, maybe Robert can chime in and let us know a fix.
This should fix the wipe section. It was a simple fix. Line 416 Changed from
to
Here is the working code. I have tested it out.
Loaded up the code and I am still having problems so I need to narrow it down. I know my neopixel works because I can load the Adafruit example code on and that works. I can compile the new code and load. I have the Wiring holed up correctly to the EZB. I an not get a response. So I am down to Something in the serial connection.
I am using an Arduino micro. I assume this should work but some of the literature suggests it has TX peculiarities. So maybe that is it.
How should I be executing the sample codes? I am putting it into a script in the script manager and running it. Should I be doing this through a serial terminal or something?