0

3W Pixie Fiber Optic Skirt
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: 3W Pixie Fiber Optic Skirt

by crusaderabbit on Wed Jan 11, 2017 6:02 pm

Hey 2112,
Thanks for the new sketch. It did compile and upload. It is a work of art and I intend to study it for all the code tricks you introduced to me here. It is a little too blinky for me, though. I hate clothes that blink. I'm trying to weave fiber optics into the fabric to make weaves of changing colors.

Keeping in mind everything you taught me about heat and power draw I have reduced the brightness of the Pixies overall and I have reduced the time they are lit. I have also put in down time for each pixie, with the two pixies alternating back and forth. Here is the code:

Code: Select all | TOGGLE FULL SIZE
#include "Adafruit_Pixie.h"
#include "SoftwareSerial.h"

#define NUMPIXELS 2 // Number of Pixies in the strip
#define PIXIEPIN  6 // Pin number for SoftwareSerial output

SoftwareSerial pixieSerial(-1, PIXIEPIN);
Adafruit_Pixie strip = Adafruit_Pixie(NUMPIXELS, &pixieSerial);

void setup()
{
  pixieSerial.begin(115200); // Pixie REQUIRES this baud rate
  strip.setBrightness(200); // Adjust as necessary to avoid blinding
  }

void loop()
{
  strip.setPixelColor(0,255,169,214);  //pink
  strip.setPixelColor(1,93,219,211);  //teal
  strip.show();
  for (int i = 0; i<15; ++i)
  {
    delay(1000);
    strip.show();
  }

  strip.setPixelColor(0,0,0,0);  //blank
  strip.setPixelColor(1,93,219,211);  //teal
  strip.show();
  for (int i = 0; i<15; ++i)
  {
    delay(1000);
    strip.show();
  }
  strip.setPixelColor(0,93,219,211);  //teal
  strip.setPixelColor(1,0,0,0);  //blank
  strip.show();
  for (int i = 0; i<15; ++i)
  {
    delay(1000);
    strip.show();
  }
 
  strip.setPixelColor(0,255,169,214); //pink
  strip.setPixelColor(1,255,169,214); //pink
  strip.show();
  for (int i = 0; i<30; ++i)
  {
    delay(1000);
    strip.show();
  }
 
  strip.setPixelColor(0,93,219,211);  //teal
  strip.setPixelColor(1,255,169,214); //pink
  strip.show();
  for (int i = 0; i<15; ++i)
  {
    delay(1000);
    strip.show();
  }
 
  strip.setPixelColor(0,255,169,214);  //pink
  strip.setPixelColor(1,0,0,0);  //blank
  strip.show();
  for (int i = 0; i<15; ++i)
  {
    delay(1000);
    strip.show();
  }
 
  strip.setPixelColor(0,0,0,0);  //blank
  strip.setPixelColor(1,255,169,214);  //pink
  strip.show();
  for (int i = 0; i<15; ++i)
  {
    delay(1000);
    strip.show();
  }
 
  strip.setPixelColor(0,93,219,211);  //teal
  strip.setPixelColor(1,93,219,211);  //teal
  strip.show();
  for (int i = 0; i<30; ++i)
  {
    delay(1000);
    strip.show();
  }
 }


Can you recommend some books on programming Arduino? Is that how you learned? Are you a C++ expert programmer? I looked into taking a C++ class here at Mesa. They offered 7 sections in the coming Spring semester. They are all full already. Three of the sections are on-line with 50 students in each. Everybody and his brother is taking C++. In contrast the fashion classes here offer 1 section of each class and most do not fill.

I like the look of the lights as I now have them and will proceed to put them into the hat. Time to practice soldering. Hope I don't screw up my $15 Pixies. Have to go for today. Will let you know as things progress. Thanks again.

Crusaderabbit

crusaderabbit
 
Posts: 119
Joined: Wed Apr 13, 2016 1:55 pm

Re: 3W Pixie Fiber Optic Skirt

by 2112 on Wed Jan 11, 2017 7:46 pm

Run it for a few minutes and feel the lights to see how warm they are getting. Feel your 26 AWG wire as well.

LOL I've been doing this for over 30 years now but I'm no expert. Yep, I'm an old dude!

Don't get confused between C and C++, two different animals. C++ in it's purest form is Object Oriented Programming (OOP). The Arduino is more ANSI C. Here is a book to download. It's not specific to Arduino but a good reference for explanations.https://www.ime.usp.br/~pf/Kernighan-Ritchie/C-Programming-Ebook.pdf. You can put it in your Kindle or smartphone.

For more Arduino specific information my first move is in the Arduino IDE click Help >> Reference. If that doesn't help google Arduino something. Or join the Arduino.cc forum and ask questions there. A lot of great ppl there. As well as here but they are Adafruit specific here of course. Stackoverflow.com is another good source. If you have a question I'm sure it's been asked and answered a few times there.

Good Luck to you. I hope it all works out well. You're learning something here you probably didn't imagine you would when you signed up for this class. How much fun programming can be and how it can be applied. All it takes is imagination, $$ and Adafruit :)
Last edited by 2112 on Thu Jan 12, 2017 8:59 am, edited 1 time in total.

2112
 
Posts: 84
Joined: Tue Dec 13, 2016 11:02 am

Re: 3W Pixie Fiber Optic Skirt

by 2112 on Wed Jan 11, 2017 10:31 pm

Be aware while running your profile the battery will last about 1 hour.

2112
 
Posts: 84
Joined: Tue Dec 13, 2016 11:02 am

Please be positive and constructive with your questions and comments.