Difference between revisions of "LEDLightDistrict"
Brainsmoke (talk | contribs) |
Brainsmoke (talk | contribs) (→Arduino code) |
||
Line 33: | Line 33: | ||
==== Arduino code ==== | ==== Arduino code ==== | ||
+ | |||
+ | <code lang="C"> | ||
+ | #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()) {} | ||
+ | |||
+ | if ( (c = Serial.read()) == 254 ) | ||
+ | break; | ||
+ | |||
+ | SPI.transfer(c); | ||
+ | } | ||
+ | delay(1); | ||
+ | } | ||
+ | </code> | ||
==== Arduino pin-out ==== | ==== Arduino pin-out ==== |
Revision as of 02:53, 30 November 2012
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 indicio
- add yourself to the dailup group
-
git checkout https://github.com/techinc/lewd.git
- follow instructions in lib/README to install USPP
-
cd src ; python ledwall.py
Hardware
Design
Overview
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()) {} if ( (c = Serial.read()) == 254 ) break; SPI.transfer(c); } delay(1); }
Arduino pin-out
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
Project to LED'ify the outside facing glass 'block' wall. each glass box will be a pixel
The pledge has been funded and the wall has been built
TODO:
- Finish documentation
- Host documentation somewhere
- Add nice pictures of the (new) LED wall in action.
- Set up the software in such a way that it is trivial for anyone to at least "start" the ledwall in normal operation.
Usage
Plug both power supplies at either side of the wall
The arduino is by the power supply on the left hand side. The computer powering the server is under the retro gaming table.
Running the software is pretty trivial; but requires access to the machine connected to the ledwall. Alternatively, you can attach your machine to the ledwall yourself and run the software locally.
On whatever machine that is connected to the LED wall over USB (serial); run the file net/net.py and then, in another terminal, run the file ledwall.py with the -net flag. Alternatively, you can just run the ledwall.py file with no flags, but do not run the net.py file concurrently in this case.