Difference between revisions of "LEDLightDistrict"
Brainsmoke (talk | contribs) (→Arduino pin-out) |
Brainsmoke (talk | contribs) (→Raspi GPIO pin-out) |
||
Line 35: | Line 35: | ||
The code uses the hardware SPI present on the the Raspberry Pi. | The code uses the hardware SPI present on the the Raspberry Pi. | ||
− | * <span style="color: green; font-weight: Bold;">Green wire</span> on <strong>Pin | + | * <span style="color: green; font-weight: Bold;">Green wire</span> on <strong>Pin 23</strong> is <strong>Clock</strong> |
− | * <span style="color: #dddd11; font-weight: Bold;">Yellow wire</span> on <strong>Pin | + | * <span style="color: #dddd11; font-weight: Bold;">Yellow wire</span> on <strong>Pin 19</strong> is <strong>Data</strong> |
− | * <span style="color: black; font-weight: Bold;">Black wire</span> <strong><del>should be connected to | + | * <span style="color: black; font-weight: Bold;">Black wire</span> <strong><del>should be connected to a ground pin.</del> does not have to be connected to the ground pin, not having a common ground works as well, and doesn't generate noise.</strong> |
− | * <span style="color: red; font-weight: Bold;">Red wire</span> <strong>should NOT be connected to the | + | * <span style="color: red; font-weight: Bold;">Red wire</span> <strong>should NOT be connected to the Raspi as it will break it!</strong> |
[[Image:raspi_spi.jpg|480px]] | [[Image:raspi_spi.jpg|480px]] |
Revision as of 06:20, 10 February 2013
Projects | |
---|---|
Participants | Guido, Wizzup |
Skills | soldering, coding |
Status | Active |
Niche | Electronics |
Purpose | World domination |
Project to LED'ify the outside facing glass 'block' wall. each glass box will be a pixel the space
Contents
Turning it on/off
- On: Plug in its power supply
- Off: Pull out its power supply
Doesn't work!
- log in to ledwall using the user techinc
-
git checkout https://github.com/techinc/lewd.git
-
for the C fireplace: cd c ; ./fire /dev/spidev0.0 (should be started automatically by /etc/rc.local)
-
for the python implementation: cd src ; python ledshow.py -spi
Hardware
Design
Overview
Raspberry Pi ===(SPI)===> ledwall ^ ^ | (5V) | (12V) \----------PSU ---------/
Raspi GPIO pin-out
The code uses the hardware SPI present on the the Raspberry Pi.
- Green wire on Pin 23 is Clock
- Yellow wire on Pin 19 is Data
- Black wire
should be connected to a ground pin.does not have to be connected to the ground pin, not having a common ground works as well, and doesn't generate noise. - Red wire should NOT be connected to the Raspi as it will break it!
PSU
Software
Software Implementations
[https://github.com/techinc/lewd The current python based implementation called lewd] runs on the machine connected to the LED-Wall over a serial port.
The older javascript node.js version can communicate with the python implementation to push frames to the LED-Wall using TCP sockets.
Python documentation (temporary location) http://old.villavu.com/merlijn/lewd
Lewd
The Python (lewd) implementation features several backends. LedScreen, RemoteLedScreen and VirtualLedScreen used for local, remote and virtual access respectively.
See the file "ledwall.py" for an example on how to use all these different LedWall frontends. At the space, you should typically use RemoteLedScreen to interface with the (already running) server to the LEDWall.
To just play around with the code locally, look into the VirtualLedScreen code; you will need to install pygame to actually use the local UI.
Python documentation (temporary location)
http://old.villavu.com/merlijn/lewd
Photos & Videos
OLD
Alternative configuration using Arduino (Obsolete)
computer ===(serial over usb)===> arduino ===(SPI)===> ledwall ^ | (12V) PSU
Arduino code
#include <SPI.h> void setup() { Serial.begin(1000000); SPI.begin(); SPI.setBitOrder(MSBFIRST); SPI.setDataMode(SPI_MODE0); SPI.setClockDivider(SPI_CLOCK_DIV16); } void loop() { uint8_t c; for(;;) { while (!Serial.available()) {} /* 254 signals end of frame in the communication * over the serial port */ if ( (c = Serial.read()) == 254 ) delay(1); /* the WS2801 chips will latch after not getting * any data for .5ms, so we wait 1ms */ else SPI.transfer(c); /* not end of frame? push data */ } }
Arduino pin-out
The code uses the hardware SPI present on the the ATMega
- Green wire on Pin 13 is Clock
- Yellow wire on Pin 11 is Data
- Black wire
should be connected to the arduino's ground pin.does not have to be connected to the ground pin, not having a common ground works as well, and doesn't generate noise. - Red wire should NOT be connected to the arduino as it will break it!