Hardware Reference
In-Depth Information
Code and Battery
Triple-check that all your conductive thread tails are trimmed
and your skirt is lying flat on a nonconductive surface, and then
connect your FLORA main board to your computer with a USB
cable, as shown in
Figure 6-14
.
Open the Adafruit Arduino IDE. You will need the NeoPixel
library for this next step, which comes preloaded with the Ada-
fruit Arduino IDE and Codebender (see
“Easy Programming with
Codebender” on page 16
).
First, test out all six pixels by uploading the sketch in
File
→
Examples
→
Adafruit_NeoPixel
→
strandtest.
Figure 6-14.
Plug in the USB cable to load sample code
If all of your pixels light up and change color, you're good to con-
tinue to the back! Disconnect the USB cable before stitching
more pixels on the back of the skirt.
To test the accelerometer, you'll need to install the
Adafruit Sen-
sor library
as well as the
uniied LSM303DLHC library
.
See
Chapter 2
for more information about installing libraries. You
can test out the accelerometer by uploading the sketch in
File
→
Examples
→
Adafruit_LSM303
→
Test. Open up the serial
monitor and watch for changing motion values.
When you have pixels on the front and back of the skirt, place a
piece of scrap fabric in between them for testing (so they don't
touch and short each other out), or put the skirt on a (noncon-