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
Wiki Articles
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.
Thanks,
Russ
-
@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
-b
option, 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'
Russ
-
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.
-
@Russ-Terrell
To turn a pixel off, try:
neopixel-tool set 0 000000
In the meantime, I'll update the parser to ignore the0x
Edit:
I've updated the command line parser, update the neopixel-tool to the latest version:opkg update opkg --force-reinstall install neopixel-tool
And
neopixel-tool set 0 0x000000
will successfully turn a pixel off, I've tried it out on my end.
For the
-s
option, try updating the Onion Neopixel Libraryopkg 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.
Russ
-
Links doesn't work in this post and on page https://onion.io/controlling-neopixels-arduino-dock/
-
@Alexandr-Didenko Presumably you know this article (written by Francis Chung December 22, 2015) related to the original Omega and the original Arduino Dock.
Live links for
-
'wiki post'
Arduino Dock Initial Setup
http://onioniot.github.io/wiki/Tutorials/Arduino-Dock/Initial-Setup
Using the Arduino Dock
http://onioniot.github.io/wiki/Tutorials/Arduino-Dock/Using-the-Arduino-Dock -
'Controlling Neopixels from the command line'
Controlling Neopixels
http://onioniot.github.io/wiki/Tutorials/Arduino-Dock/Controlling-Neopixels -
'Information on the C & C++ Libraries and Python Module'
Arduino Dock Neopixel Library
http://onioniot.github.io/wiki/Documentation/Libraries/Arduino-Dock-Neopixel-Library
-