Hardware Reference
In-Depth Information
ductive) dress form. When you're wearing the skirt, your body
will keep the front and back from touching.
If your skirt has lots of folds, you may have trouble with your
pixel connections shorting out against each other. You can insu-
late them under a piece of ribbon, wear a slip under the skirt,
and also add some wobble to your pixel line so when the skirt
folds, traces aren't up against each other.
To add sparkle to your skirt, copy the following code into your
Adafruit Arduino IDE and click Upload. You can specify the col-
ors in the myFavoriteColors array, and if you're not getting any
reaction to your movement, you can adjust the sensitivity by
setting MOVE_THRESHOLD to a lower number.
You can also download the code from Adafruit ; there are two
versions of the code on that page. The first one uses the older
Adafruit_LSM303 driver. The second one requires you to install
the drivers listed earlier in this section. Make sure you use the
version that matches the libraries you've got installed. The sec-
ond version is listed here:
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_LSM303_U.h>
#include <Adafruit_NeoPixel.h>
// Parameter 1 = number of pixels in strip
// Parameter 2 = pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
// NEO_RGB Pixels are wired for RGB bitstream
// NEO_GRB Pixels are wired for GRB bitstream
// NEO_KHZ400 400 KHz bitstream (e.g. FLORA pixels)
// NEO_KHZ800 800 KHz bitstream (e.g. High Density LED
// strip)
Adafruit_NeoPixel strip = Adafruit_NeoPixel ( 6 , 6 , NEO_GRB +
NEO_KHZ800 );
Adafruit_LSM303_Accel_Unified accel =
Adafruit_LSM303_Accel_Unified ( 54321 );
// Here is where you can put in your favorite colors that will
// appear! Just add new {nnn, nnn, nnn}, lines. They will be
// picked out randomly.
// R G B
uint8_t myFavoriteColors [][ 3 ] = {{ 200 , 0 , 200 }, // purple
Search WWH ::




Custom Search