Hardware Reference
In-Depth Information
Get Your Code On
Plug in a USB cable to connect the FLORA main board to your
computer. Open up the Adafruit Arduino IDE.
First, test out your pixel's connections by uploading the sketch
in File
→
Examples
→
Adafruit_NeoPixel
→
strandtest.
Once you're sure the pixel works, open a new sketch, then
upload the following code to make the pixel change color when
the snap is connected (see
Figure 5-4
) and disconnected (see
Figure 5-5
).
Figure 5-4.
Connected switch
Figure 5-5.
Disconnected switch