Controlling Neopixels with your Arduino Dock
Hopefully you guys still have some holiday decorations to put up, because the Omega + Arduino Dock can now control Neopixels through a variety of methods!
You can use the new command line utility,
neopixel-tool, or you can use libraries for C and C++ or a Python module to write your own Neopixel programs.
The jist of it is that the Onion Arduino Library has been updated to receive commands from the Omega to send instructions to Neopixels. So after updating the Sketch that's on your Arduino Dock with one that includes the latest library, you can use the Omega to control Neopixels connected to the Arduino Dock pins!
Check out this wiki post for info on how to get the latest Onion Arduino Library. We've streamlined the process!
To install the command line tool
Make sure you're on the latest firmware (b250), and run the following commands:
opkg update opkg install neopixel-tool
Check out the new Neopixel related wiki articles for ALL of the details and examples:
As always, let us know how it goes!
To get this to work properly, do you need to reflash the bootloader? My board is flashed with b220. I followed the directions as posted. I can turn on the correct pixel, but it's always the magenta color, no matter what value I try.
Other issues.... I had to install the Adafruit_NeoPixel library. I was getting compile errors that pointed to it.
Lastly, I'm getting errors on the neopixel-tool -b, neopixel-tool -sb and neopixel-tool -s commands.
@Russ-Terrell No, no need to reflash the bootloader.
You will have to download the Adafruit Neopixel library, as well as the latest version of the Onion Arduino Library. Once that's done, you can load the blink2 example sketch on to your Arduino Dock, the neopixel tool should work.
If you still see issues with the
-boption, try reinstalling the package, there have been some updates today:
opkg update opkg remove neopixel-tool opkg install neopixel-tool
Let me know how it goes!
Updated both the Onion and Neo libraries. Working much better now.
How do you turn a pixel off? I tried neopixel-tool set 0 0x000000, but it tuned blue.
Also not working:
root@Omega-198E:~# neopixel-tool -sb 63 neopixel-tool: can't resolve symbol '_ZN13onionNeopixel13SetBrightnessEi' root@Omega-198E:~# neopixel-tool -b 127 neopixel-tool: can't resolve symbol '_ZN13onionNeopixel13SetBrightnessEi'
Does this mean that there will be no official library from Onion, for controlling the Neopixels directly from the Omega? I kind of hoped that we could do without the Arduino layer.
To turn a pixel off, try:
neopixel-tool set 0 000000
In the meantime, I'll update the parser to ignore the
I've updated the command line parser, update the neopixel-tool to the latest version:
opkg update opkg --force-reinstall install neopixel-tool
neopixel-tool set 0 0x000000will successfully turn a pixel off, I've tried it out on my end.
-soption, try updating the Onion Neopixel Library
opkg update opkg --force-reinstall install libonionneopixel
@Pavils-Jurjans there are plans to work on a method to control Neopixels without the Arduino Dock sometime in the new year, stay tuned!
All works great now! Thanks for the hard work on this.
Links doesn't work in this post and on page https://onion.io/controlling-neopixels-arduino-dock/
Live links for
Arduino Dock Initial Setup
Using the Arduino Dock
'Controlling Neopixels from the command line'
'Information on the C & C++ Libraries and Python Module'
Arduino Dock Neopixel Library