diff options
author | unknown <Adam Martindale@.(none)> | 2011-09-12 15:58:18 +0100 |
---|---|---|
committer | unknown <Adam Martindale@.(none)> | 2011-09-12 15:58:18 +0100 |
commit | 7d06a1bb2ef15c57766886831f47fdc83519e6de (patch) | |
tree | 4f0e84d02eea21a292a2b0ed290e8bd8845fff6b /Arduino/LEDMatrix | |
parent | 7cab7709fd96a6c12f2d4b7ac73e224b79dd0385 (diff) | |
parent | 223480547e0c3e54f729356dce80bd40d401cf79 (diff) | |
download | punchingbag-7d06a1bb2ef15c57766886831f47fdc83519e6de.tar punchingbag-7d06a1bb2ef15c57766886831f47fdc83519e6de.tar.gz |
Merge branch 'master' of gitorious.org:punchingbag/punchingbag
Conflicts:
PunchingBag/src/PunchingBagGUI.java
Diffstat (limited to 'Arduino/LEDMatrix')
-rw-r--r-- | Arduino/LEDMatrix/LEDMatrix.pde | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/Arduino/LEDMatrix/LEDMatrix.pde b/Arduino/LEDMatrix/LEDMatrix.pde index 4a07bfc..1a709be 100644 --- a/Arduino/LEDMatrix/LEDMatrix.pde +++ b/Arduino/LEDMatrix/LEDMatrix.pde @@ -24,10 +24,29 @@ void setup ( ) void loop ( ) { - for (int i=0; i<(chips * 8); i++) { - buffer[i] = 0b10101010;//random(-128,127); // Just Green + /*buffer[0] = 127; + buffer[1] = 0b10101010; + buffer[2] = 0b01010101; + for (int i=3; i<(chips * 8); i++) { + buffer[i] = 0;//random(-128,127); // Just Green 0b10101010 + } + matrix.Update();*/ + + + while (true) { + int read = Serial.read(); + if ((byte) read == (byte) 108) { + for (int b=0; b< (chips * 8); ) { + if ((read = Serial.read()) != -1) { + buffer[b] = (byte) read; + b++; + } + } + break; + } } matrix.Update(); + } @@ -38,3 +57,7 @@ void loop ( ) + + + + |