header

 

More links

AutoHotkey | Android | Arduino | COMM140Fractals | Grammar Checkers | Knots | A Million Dots Activity |  Processing | Processing for Scratch Users | RedBubble | Tutorials | Weather | World Time Meeting Planner | Favicon Generator.

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.
   strip.show();
}

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.show();
   delay(250);

   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

   strip.show();
   delay(250);
}


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

Last refreshed: April 26 2024. 03:22.29 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.


187 visits since May 14, 2013