|
|
# Description
|
|
|
|
|
|
# Table 1
|
|
|
|
|
|
+ name: table1
|
|
|
+ iot ip: 10.200.3.94
|
|
|
+ mac address: `?`
|
|
|
|
|
|
# Table 2
|
|
|
|
|
|
+ name: table2
|
|
|
+ iot ip: 10.200.3.93
|
|
|
+ mac address: `?`
|
|
|
|
|
|
# Table 3
|
|
|
|
|
|
+ name: table3
|
|
|
+ iot ip: 10.200.3.102
|
|
|
+ mac address: `dc:a6:32:49:28:a3`
|
|
|
|
|
|
# Table 2
|
|
|
|
|
|
+ name: table2
|
|
|
+ iot ip: 10.200.5.4
|
|
|
+ mac address: `dc:a6:32:3a:78:f3`
|
|
|
|
|
|
# Operating
|
|
|
|
|
|
3 python scripts to manage LED table:
|
|
|
|
|
|
+ led_table.py: dedicated to the LED strip
|
|
|
+ mqttmanager.py: dedicated to the MQTT protocol
|
|
|
+ raspiTestbed.py: to manage both led strip and mqtt protocol
|
|
|
|
|
|
Each script has its own main and can be used independently.
|
|
|
|
|
|
# Message format
|
|
|
|
|
|
+ turn on one LED
|
|
|
```
|
|
|
{"x":2,"y":2,"c":{"r":0,"g":0,"b":255}}
|
|
|
```
|
|
|
+ turn on several leds
|
|
|
```
|
|
|
{"led":[{"x":1,"y":1,"c":{"r":0,"g":0,"b":255}},{"x":2,"y":1,"c":{"r":0,"g":0,"b":255}}]}
|
|
|
```
|
|
|
+ run table tests
|
|
|
```
|
|
|
wipe: {"type":"wipe","r":255,"g":255,"b":0}
|
|
|
blackout: {"type":"blackout"}
|
|
|
```
|
|
|
|
|
|
## Control command
|
|
|
|
|
|
+ Examples:
|
|
|
```
|
|
|
> mosquitto_pub -h 10.200.3.101 -t table1/testTable -m '{"type":"wipe","r":255,"g":0,"b":255}'
|
|
|
> mosquitto_pub -h 10.200.3.101 -t table2/led -m '{"x":2,"y":2,"c":{"r":0,"g":0,"b":255}}'
|
|
|
> mosquitto_pub -h 10.200.3.101 -t table1/leds -m '{"led":[{"x":1,"y":1,"c":{"r":0,"g":0,"b":255}},{"x":2,"y":1,"c":{"r":0,"g":0,"b":255}}]}'
|
|
|
``` |