Zum Inhalt springen

RGB-LED-Matrix: Unterschied zwischen den Versionen

Doku init
 
M68k (Diskussion | Beiträge)
// added pic
 
(4 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt)
Zeile 2: Zeile 2:


das Metalab besitzt nun eine assemblierte '''RGB-LED-Matrix'''.<br />
das Metalab besitzt nun eine assemblierte '''RGB-LED-Matrix'''.<br />
die Firmware die drauf ist sollte mal ins git *husti*
die Firmware die drauf ist, findet sich unter https://github.com/Metalab/RGBmatrix (Teensy)


[[Datei:rgb_led_matrix.jpg|thumb|left]]


Was tuts:
Was tuts:
* Matrix EXTERN powern über ein vernünftiges Netzteil
* Matrix an ein PC Netzteil anstecken
* Teensy an USB anstecken
* USB Kabel an Datenverarbeitungsanlage anstecken
* "FNORD"  == start of frame
* <strike>"FNORD"  == start of frame</strike> 0x1 (siehe [[Blinkenschild]])
* 24*24*3 Byte Daten
* 24*24*3 Byte Daten
* win.
* win.
Zeile 14: Zeile 15:


in der Praxis schaut das so aus:
in der Praxis schaut das so aus:
TODO: Baudrate sollte in der Firmware noch hochgedreht werden auf 115200


   # set baudrate on tty
   # set baudrate on tty
   sudo stty -F /dev/ttyACM0 9600
   sudo stty -F /dev/ttyACM0 9600


TODO: Baudrate sollte in der Firmware noch hochgedreht werden auf 115200
'''Shell:'''
   # send new frame
   # send new frame
   echo "FNORD" > /dev/ttyACM0
   echo "FNORD" > /dev/ttyACM0
Zeile 26: Zeile 28:
   head  -c $((24*24*3)) /dev/urandom > /dev/ttyACM0
   head  -c $((24*24*3)) /dev/urandom > /dev/ttyACM0


'''Java:'''<br/>
Why would you do that? For the glory of Satan of course!<br/>
Get it at https://github.com/sixtyeight/fnord-matrix<br/>
<nowiki>
package at.metalab.fun.ledmatrix;
import java.util.Random;
public class RandomPixels extends AbstractExample {
private final static Random RANDOM = new Random(System.currentTimeMillis());
public static void main(String[] args) throws Exception {
new RandomPixels().execute(args);
}
@Override
protected void init(String[] args) throws Exception {
openLedMatrix("127.0.0.1", 1337); // connect to the daemon
}
@Override
protected void loop() throws Exception {
Pixel pixel;
for (int x = 0; x < 24; x++) {
for (int y = 0; y < 24; y++) {
pixel = frame[x][y];
pixel.r = RANDOM.nextInt(256);
pixel.g = RANDOM.nextInt(256);
pixel.b = RANDOM.nextInt(256);
}
}
display(); // display the frame
quit(); // exit gracefully
}
}
</nowiki>


viel Spass damit.
viel Spass damit.


ich glaub [[User:Amir|Amir]] bastelt da grade aktiv dran ;)
ich glaub [[User:Amir|Amir]] und [[User:m68k|m68k]] basteln da grade aktiv dran ;)
 


<nowiki>:*</nowiki>
<nowiki>:*</nowiki>
[[User:Overflo|-flo]]  <small>[Mon, 14 Jan 2013]</small>
[[User:Overflo|-flo]]  <small>[Mon, 14 Jan 2013]</small>


[[Kategorie:Projekte]]
[[Kategorie:Projekte]]