Upcoming Events

Jason Kelly Johnson will be running a one-day intensive Firefly/Arduino Workshop "RESPONSIVE BUILDING FACADES" on July 27, 2012 in San Francisco (as a part of the Architect's Newspaper "Art and Science of Building Facades" Symposium.) Register here.

Are you teaching or participating in a workshop that is using Firefly?  Let us know about it and we'll feature it here on the Firefly website! (info@fireflyexperiments.com)

Discussions > Adding pins to digital write panel for Arduino Uno

Hello,
We are working with arduino uno, and we need to use 12 pins for digital write, in order to light up 4 RGB LEDs.
The existing panel only has 9 pins, and we need to find a way to add 3 more.
Please help us...!
Thank You,
Ofri, Bar, Ayelet.

February 15, 2012 | Unregistered CommenterOfri

Hi Ofri, Bar, and Ayelet,
The Uno Write component is hard-coded to have a certain number of inputs in order to match the firmata sketch. In order to work around this issue, I would recommend using the Generic Serial Write component. This will allow you to send any type of message you want out to the board. So, you will need to concatenate all twelve of your PWM values (the R, G, and B for each LED) into one string separated by commas. Then, you can use the Generic Serial Write component to send that message out to the board. You will need to modify the Firmata to read in this new string value and parse it up (splitting each value at the comma). Then, you can assign each value to a pin and use analog write to control the pulse width modulation of each color.
HTH,
Andy

February 15, 2012 | Registered CommenterEditor