More links

Adobe Connect | Adobe Conect Custom Pods | AutoHotkey | Android | Arduino | Blog | COMM140Fractals | Grammar Checkers | Knots | a Million Dots |  Processing | RedBubble | Tutorials | Weather | World Time Meeting Planner |

Home > Tutorials > LilyPad & Flora > Flora Programs > Flora red-blue flashing example

Flora red-blue flashing example


flashing red blue pixels


Flora flashing red blue pixels



Flora Source Code


#include "Adafruit_FloraPixel.h"

Example sketch for driving Adafruit Flora pixels
Connect a single pixel to the Flora
Connect the data in (inward pointing arrow) on the first pixel in the strip to D6 on the Flora,
then connect the data out (outward point arrow) to the data in on the second pixel
Connect - on both pixels to GND (Ground) on the Flora
Connect + on both pixels to 3.3v on the Flora

Adafruit_FloraPixel strip = Adafruit_FloraPixel(2); // 2 pixels in strip

void setup() {
   strip.begin(); // Update the strip, this will turn off the pixel.

void loop() {

   strip.setPixelColor(0,0,255,0); // set pixel 0 to red full brightness
   strip.setPixelColor(1,0,0,255); // set pixel 1 to blue full brightness

   strip.setPixelColor(0,0,0,255); // set pixel 0 to blue full brightness
   strip.setPixelColor(1,0,255,0); // set pixel 1 to red full brightness


APA citation:
Russell, R. (2016, July 04, 03:42 pm). Mimimum flora program
     Retrieved January 24, 2018, from http://www.rupert.id.au/tutorials/lilypad/minimum.php

Last refreshed: January 24 2018. 07:07.14 am

rupert dot russell at acu dot edu dot au Support Wikipedia

Creative Commons License This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License.

752 visits since May 14, 2013