Update main.py

This commit is contained in:
1708639776959.sdtroot 2024-05-21 06:18:38 +00:00
parent 41c2b93858
commit 48198075f1
1 changed files with 2 additions and 2 deletions

View File

@ -3,14 +3,14 @@ import time
import uuid
sdtcloud = sdtcloudpubsub.sdtcloudpubsub()
mqttClient = sdtcloud.setClient(f"device-app-{uuid.uuid1()}") # parameter is client ID(string)
sdtcloud.setClient(f"device-app-{uuid.uuid1()}") # parameter is client ID(string)
def runAction():
while True:
msg = {
"message": "Hello World"
}
sdtcloud.pubMessage(mqttClient, msg)
sdtcloud.pubMessage(msg)
time.sleep(2)
if __name__ == "__main__":