AutoHotkey | Android | Arduino | COMM140 | Fractals | 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
#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 November 21, 2024, from http://www.rupert.id.au/tutorials/lilypad/minimum.php
Last refreshed: November 21 2024. 12:44.14 am
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License.