Good Day!
I was wondering if there'a any guide in controlling Adafruit NeoPixel RGB Strips from a master RPi to a slaved Arduino Nano.
Controlling NeoPixels from a slaved Arduino
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- SkyKnightOwl
- Posts: 1
- Joined: Tue Aug 08, 2017 4:24 am
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Controlling NeoPixels from a slaved Arduino
No guide for this. Yow is the nano connected to the pi? Serial? I2C?
Whatever, you'll need to come up with a simple comm protocol to send commands to the nano. Simplest thing might be to just send a pixel number, r, g, and b values in ascii text.
something like this:
You would write a parser on the nano that converts the ascii to binary, using the commas to separate the values. Look for the newline to separate the commands. Then just plug the data into a setPixelColor function call.
Add another ascii command to signal a call to the show pixels function
Whatever, you'll need to come up with a simple comm protocol to send commands to the nano. Simplest thing might be to just send a pixel number, r, g, and b values in ascii text.
something like this:
Code: Select all
0, 0, 255, 128
1, 255, 128, 0
Add another ascii command to signal a call to the show pixels function
Please be positive and constructive with your questions and comments.