RGB LED Strip WS2812b mit RaspberryPi
- Titel:
- RGB LED Strip WS2812b mit RaspberryPi
- Workshopleiter:
- com2u
- Wann:
- Samstag 14:00
- Wo:
- Labor
- Dauer:
- 4-6 std
Beschreibung
Anbinden eines RGB LED Streifens an den RaspberryPi. Zur Kommunikation wir via USB die FadeCandy Platine verwendet. Ein 5V Netzteil gibt dem LEDs und dem RaspberryPi Strom.
Wir schreiben ein einfaches Programm zum Ansteuern der LEDs und spielen mit den Farbeffekten. Die Teilnehmer können das Programm nach eigenen Kenntnissen erweitern.
Jede LED des Streifens lässt sich einzeln ansteuern. Es gibt Treiber um die FadeCandy Platine auch direckt unter Linux, Mac oder Windows anzusteuern.
Ablauf:
- 0,5h – Theoretische Einführung
- 0,5h – Arbeitsplatz einrichten, Komponenten zusammensuchen
- 1h – Löten
- 1h – RaspberryPi in Betrieb nehmen (Image, IDE, etc. installieren)
- 1h – Programmieren
- 0-2h – Spielen, Testen, Erweitern
Teilnahme
Voraussetzungen
- Die Teilnehmer sollten keine Angst vor Elektronik und dem Programmieren haben. Ansonsten ist das ein Einsteigerlevel.
- Fragen oder Anmeldung per E-Mail direckt an patrick.hess [ät] com2u.de
Material für Teilnehmer / Unkosten
Ich kann einige RasPi, LED Stripes, Netzteile, FadeCandy Platinen mitbringen und stellen.
Wer das Zeug dann kaufen möchte. ~35€ Raspberry, ~35€ Fadecandy, ~20€ RGB Streifen, ~10€ Netzteil
Teilnehmer können auch mitbringen was sie schon haben. Bitte in der Tabelle Angeben
Teilnehmer (max 10)
Nummer | Wer | Benoetigtes Material |
---|---|---|
derchris | LED Stripe, Netzteil, FadeCandy | |
iomf42 | LED Stripe, Netzteil, FadeCandy | |
b3n | LED Stripe, Netzteil, FadeCandy | |
mazzoo | evtl netzteil | |
sumi | LED Stripe, Netzteil, FadeCandy | |
hauke | LED Stripe, Netzteil, FadeCandy | |
sam | FadeCandy | |
Raipat | Netzteil, FadeCandy | |
benny | LED Stripe, Netzteil, FadeCandy | |
stefan | LED Stripe, Netzteil, FadeCandy |
Weiterführende Workshops
Install Raspberry Image
https://www.raspberrypi.org/downloads/raspbian/ (Raspbian Jessie)
Download Image and copy to micro SD-Card. e.g. Use Disk Imager: https://sourceforge.net/projects/win32diskimager/
Insert SD-Card and power the Raspberry Pi Unordered List Item Startup Raspberry
If you connect the Raspberry to the LAN it will get an IP-address automatically
Check IP address. Go to the router and check out the new IP-Address.
WLAN: NETGEAR Router: 192.168.1.1 User: admin Password: password
http://192.168.1.1/index.htm → Menu → Attached Devices
Change the name of your Raspberry: http://developpeers.com/blogs/change-the-hostname-of-your-raspberry-pi
Connect to the raspberry
- shell: e.g. via Putty: http://www.putty.org/
- file transfer: e.g. WinSCP: https://winscp.net/eng/download.php
- graphical desktop: e.g. TightVNC http://www.tightvnc.com/download.php
User: pi Password: raspberry
Download Fadecandy ressources:
https://github.com/scanlime/fadecandy
cd /home/pi/
Recent Raspbian versions have the git tool preinstalled, but for posterity let’s confirm:
sudo apt-get -y install git
Then retrieve the Fadecandy software from Github:
git clone https://github.com/scanlime/fadecandy
The package includes a pre-built executable for Raspberry Pi, but it’s built on an older version of Raspbian and won’t work on the current system. Not to worry, a new one can be compiled in just a few steps:
cd fadecandy/server make submodules make
This takes about 10 minutes to complete, depending on your internet connection. Once it’s finished, type:
PlugIn FadeCandy Test if the server is working:
sudo ./fcserver
Expected output:
[1462207979:8206] NOTICE: Server listening on 127.0.0.1:7890 USB device Fadecandy (Serial# OWAWFXJJYCVPZLIJ, Version 1.07) attached.
Open in the Browser: http://localhost:7890
Start the first simple program
cd /home/pi/fadecandy/examples/python/ python burnin.py python chase.py python solid-white.py python strobe.py python crosstalk-test.py
Install VNC server:
Expand file system:
sudo raspi-config -> 'expand-rootfs sudo mv fcserver /usr/local/bin
To make the fcserver program start automatically when the system boots:
sudo nano /etc/rc.local
JAVA
sudo apt-get install openjdk-7-jdk javac pathAndFilename.java java pathAndFilename java -jar pathAndFilename.jar
ESP8266 Workshop
http://dangerousprototypes.com/forum/viewtopic.php?f=56&t=7026