Commit 3e9b71a2 authored by schneider's avatar schneider
Browse files

more sewable led content

parent 17426a41
Pipeline #4379 passed with stage
in 35 seconds
......@@ -3,9 +3,60 @@ title: Sewable RGB LEDs Tutorial
## Type of LED used
### How to solder the bare PCB
This tutorial is based on the Sparkfun [LilyPad Pixel Board]( addressable RGB LED.
You can either order them online or get them as a kit from the card10 team at any CCC event.
### How to solder the kit
If you received an LED that is not yet soldered onto the PCB with the sewable connections, you need to solder the LED onto the board. See the following picture for the chamfered corner indicating the correct position of the LED:
[![pin 1 markger](/media/led_sewing/led_corner_mark.jpg)](/media/led_sewing/led_corner_mark.jpg)
After finding the correct alignment of the LED, tin one of the solder pads on the PCB, and then solder on the LED. Continue to solder the remaining 3 pins. Heating both the pad and the pin on the LED is a
bit tricky, don't hesitate to ask for help/advice.
## Connecting LEDs to the card10
You need to make three connections from the card10 to the LED. Before you start sewing, check that the PCB is aligned so none of the sewn connections cross.
Not all 6 sewable connections are used (see below), so you can use non-conductive thread to attach the LED board with the unused sewable corners.
Next we give you the connections you need to make, followed by some tips for sewing with conductive thread.
### Connections
The six connections are marked in figure [TODO]. DI and DO are duplicated, you only need to use one of each.
* GND is marked with a -, right next to the capital L
* 3.3 V is marked with a +, it is the connector on the opposite side of GND
* Data In is marked DI, pick one of the two available DI pins
* Data Out is marked with DO; you only need this pin if you are attaching a more RGB LEDs. In this case pick one of the two available DO pins and connect it to a DI pin of the next LED.
### Tips for sewing
Whilst very practical, the conductivity of the thread can also be a curse when the thread gets into the wrong places. To make sure the end of your thread doesn't short circuit the card10, first sew it onto the wristband
at a safe distance. You can make a knot at the end of the thread to fix it onto the wristband. To seal the end of the conductive thread, you can add a little drop of nail polish on top of it.
While the risk of damaging your card10 is while it is sleeping, we recomment to fully switch the card10 off by holding the power/menu button for more than 8 seconds.
Please also make sure to not leave behind any conductive fibers. They might ruin someones day.
## Software
The card10 firmware has support for the type of LED which the LilyPad Pixel Board uses (WS2812). It is located in the ws2812 module. See our (firmware documentation)[] for details.
### Quick start
- Connect your card10 via USB
- Open a serial console to your card10 (see ... for details)
- Press Ctrl+C to stop the current application
- Type the following code (replacing `gpio.WRISTBAND_1` with the pin you are using:
import gpio
import ws2812
ws2812.set_all(gpio.WRISTBAND_1, [[255, 255, 0]])
### Sample application
This example queries the state of the lower right button and turns multiple RGB LEDs on when it is pressed:
An example which connects the accelerometer with multiple RGB LEDs. They start lighting up when the card10 is moved:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment