changes, build and test script

This commit is contained in:
2019-11-24 00:15:27 +01:00
parent dad092c087
commit 77187d0d46
6 changed files with 74 additions and 13 deletions

23
test/test.py Normal file
View File

@ -0,0 +1,23 @@
import paho.mqtt.client as mqtt
RGB_TOPIC = 'IoT/RgbLedStripe/ColorCommand'
client = mqtt.Client(client_id = 'test1')
client.connect("172.16.2.16", 1883, 60)
i = 0
while True:
client.loop()
i += 1
if i == 300:
i = 0
client.publish(RGB_TOPIC, "{0} 0 0 255".format(i))
client.publish(RGB_TOPIC, "{0} 0 255 0".format(i+1))
client.publish(RGB_TOPIC, "{0} 255 0 0".format(i+2))
client.publish(RGB_TOPIC, "{0} 0 0 0".format(i))