Merge branch 'master' of github.com:syn2cat/syndilights

master
Raphaël Vinot 2015-04-19 22:50:09 +02:00
commit 37cde64c22
4 changed files with 132 additions and 4 deletions

View File

@ -15,8 +15,8 @@
// How many NeoPixels are attached to the Arduino?
// at 800Mhz we can send 33333 color values / second
// so to have 60hz refresh the max pixels is 555 so we set it to arbitryrily 512
#define ROWS 5
#define COLS 5
#define ROWS 25
#define COLS 20
#define NUMPIXELS ROWS*COLS

View File

@ -0,0 +1,52 @@
#!/bin/bash
# test program
# modify below the ethernet adress
IP="$1"
# width and height are unfortunately hardcoded
a=-1
while true
do
a=$((a+1))
frame="$(
echo "s2l"
printf "DI000 "
# 55518 "
printf "1"
echo ""
#a=$(date +%S)
#a=$((0+a))
j=0
while [ $j -lt 20 ]
do
i=0
while [ $i -lt 25 ]
do
n=$((i*5+j))
if [ $n -eq $a ]
then
printf "xyz "
else
printf " "
fi
i=$((i+1))
done
j=$((j+1))
echo "" # next row
done
d=0
# while [ $d -lt 12 ]
# do
# s=0
# while [ $s -lt 8 ]
# do
# printf "1${s}1 "
# s=$((s+1))
# done
# d=$((d+1))
# echo "" # next display
# done
)"
echo "$frame"
echo "$frame" | nc -w 1 -u $IP 8888
# sleep 1
done

View File

@ -6,16 +6,68 @@ Nb: The Processing Python code is Python2
This readme assumes you are in the 'v2' directory.
Flow diagram
============
+----------------+
| |
| processing |
| jton(python2) |
| |
+--------+-------+
| TCP
v
+--------+-------+
| |
| reciever |
| python3 |
+--------+-------+
| TCP
v 6379
+--------+-------+
| |
| redis |
| |
+--------+-------+
| TCP
v o-o o o-o o o-o o
+--------+-------+ | | | | | | | | |
| | o o o o o o o o o
| forwarder | | | | | | | | | |
| python3 | o o o o o o o o o
| | | | | | | | | | |
+--------+-------+ o o o o o o o o o
| serial | | | | | | | | |
v o o-o o o-o o o-o
+--------+-------+ +--------+ --------+ | |
| |==| | --------------+ |
| teensy3.1 |==| OctoWS | --------------------+
| |==| |
+----------------+ +--------+
Installation
============
```
# This is for install on a linux64 bit. Your milage may vary
# download the processinag archive here https://processing.org/download/
tar xvzf processing-*-linux64.tgz
cd processing-*
alias processing=$PWD/processing
echo "alias processing=$PWD/processing" >> .profile
# install python modules
sudo apt-get install python3-pip redis-server python-virtualenv
virtualenv -p /usr/bin/python3 virtenv
. virtenv/bin/activate
pip install -r requirements.txt
processing
# Java->Add mode... [Python] -> Install...
```
Base Setup
==========
Make sure redis-server is running. If it is you should be able to connect to port 6379
```
@ -90,7 +142,7 @@ In the mode manager select Python and install
Next step will be to open the following file in processing:
```
backend/processing/PixelControl_TCP/PixelControl_TCP.pyde
processing backend/processing/PixelControl_TCP/PixelControl_TCP.pyde
```
Configure the height and width of your Pixel Setup
@ -100,8 +152,31 @@ For test purposes the brightness has been set to low
The current demo is a green dot that will chase around the LED-strip.
Setting long_line to True or False will change the wrapping mode
<insert picture or ASCII Art here>
long_line=False
```
o-+ o-+ o-+ o-+ o
| | | | | | | | |
o | o | o | o | o
| | | | | | | | |
o | o | o | o | o
| | | | | | | | |
o | o | o | o | o
| | | | | | | | |
o +-o +-o +-o +-o
```
long_line=True
```
o---o o---o o
| | | | |
o o o o o
| | | | |
o o o o o
| | | | |
o o o o o
| | | | | |
o o---o o---o
```
Sending images to the grid
==========================

View File

@ -1,2 +1,3 @@
redis
pillow
pyserial