20 lines
597 B
Plaintext
20 lines
597 B
Plaintext
You have to connect the serial bus cable from the uC to the Raspberry.
|
|
It was connected to the lower middle USB-Port in this case,
|
|
|
|
1. start bash
|
|
(2. workon cv-4.5.3.56)
|
|
3. python
|
|
4. import serial
|
|
5. s = serial.Serial('/dev/ttyACM0', 9600)
|
|
|
|
Now you can control the LEDs.
|
|
|
|
To let the stripe light up in one color:
|
|
s.write(str.encode('RRR-GGG-BBB'))
|
|
eg: s.write(str.encode('255-000-000'))
|
|
|
|
To let the stripe light up in one of the 20 color patterns:
|
|
s.write(str.encode('color_pattern_XX')), where x is 01-20
|
|
eg: s.write(str.encode('color_pattern_01'))
|
|
|
|
Now you can start a program to detect the leds |