Firefly – LED on, off & blink

This tutorial shows how to control an LED in Firefly on an Arduino by turning it on/off and making it blink in a pattern. It also shows this process in the Arduino IDE for comparison. The Grasshopper code to turn the LED on/off uses the open port module to start communication and the uno write module for output with a boolean toggle, button, number slider and panel module acting as switches. The blink pattern code uses the binary blink module along with number sliders to control the timing. If you are experiecing the ‘WriteToDAC’ error when uploading the Firefly_Firmata.ino the fix can be found here. [Note: Change the video quality to 1080p if you are having difficulty making out details]

WIRING & GRASSHOPPER CODE

An LED (light emitting diode) requires a resistor inline on either the + or – side to limit the current / brightness. The flat side of the LED rim is the cathode (or the short leg) and connects to negative / ground. The positive voltage gets supplied to the other leg of the LED from the digital output pin of the Arduino.  [LED  LED(-)  → 150Ω → GND,  LED(+) → D10]  


 

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

ADDRESS

BRISBANE,
QLD, AUSTRALIA

CONTACT

NEWSLETTER

Sign up to recieve my newsletter