Adafruit Flora RGB Smart Pixel

This is a special forum devoted to educators using Adafruit and Arduino products for teaching.

Moderators: adafruit_support_bill, adafruit

Adafruit Flora RGB Smart Pixel

Postby katehartman » Sat Dec 08, 2012 11:56 am

I'm trying to create an extremely bare bones example with a single pixel, based off of "floratest". However I'm finding red & green are swapped. Rather than lighting RED, GREEN, BLUE, the pixels lights GREEN, RED, BLUE with the code below. Anyone else having this problem?

Code: Select all
#include "Adafruit_FloraPixel.h"
Adafruit_FloraPixel strip = Adafruit_FloraPixel(1);

void setup() {
  strip.begin();
  strip.show();
}

void loop() {
  strip.setPixelColor(0, Color(255, 0, 0));
  strip.show();
  delay(500);

  strip.setPixelColor(0, Color(0, 255, 0));
  strip.show();
  delay(500);

  strip.setPixelColor(0, Color(0, 0, 255));
  strip.show();
  delay(500);

  strip.setPixelColor(0, Color(0, 0, 0));
  strip.show();
  delay(1000);
}


RGBPixel Color(byte r, byte g, byte b)
{
  RGBPixel p;

  p.red = r;
  p.green = g;
  p.blue = b;

  return p;
}

katehartman
 
Posts: 2
Joined: Sat Dec 08, 2012 11:40 am

Re: Adafruit Flora RGB Smart Pixel

Postby bekathwia » Sun Dec 09, 2012 1:58 pm

Hey Kate,

You (and I) received an early batch of smart pixels, which were made with GRB LEDs, not RGB LEDs. They'll work fine (with two color channels reversed in your code) so long as they're not combined in the same chain with RGB pixels. Lucky you, limited edition! :D

None of the production starter packs or pixels will have this issue, we made sure! If you need more GRB pixels for a project, though, let me know.
bekathwia
 
Posts: 26
Joined: Sat Dec 25, 2010 12:18 am

Re: Adafruit Flora RGB Smart Pixel

Postby katehartman » Sun Dec 09, 2012 11:00 pm

Ah, good to know. Thanks!
katehartman
 
Posts: 2
Joined: Sat Dec 08, 2012 11:40 am


Return to For Educators

Who is online

Users browsing this forum: No registered users and 2 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [113]

Raspberry Pi[82]
 
FLORA[24]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[12]
Arduino[60]
 
NETduino[14]
 
Android[6]
 
BeagleBone[23]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[39]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[9]


 
Breakout Boards[35]
LCDs & Displays[49]
Components & Parts[70]
Batteries & Power[54]
EL Wire/Tape/Panel[52]
LEDs[112]
 
Wireless[16]
Cables[66]
 
Lasers[6]
Sensors/Parts[147]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[70]
 
iDevices[13]
Tools[71]
 
Wearables[41]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[25]


 
Stickers[41]
 
Skill badges[55]
 
Books[26]
 
Circuit Playground[7]
 
Gift Certificates[4]