repository to manage all files related to the makeathon farm bot project (Software + Documentation).
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mqtt_publisher.py 317B

123456789101112131415
  1. import paho.mqtt.client as mqtt
  2. from random import randrange, uniform
  3. import time
  4. mqttBroker ="mqtt.eclipseprojects.io"
  5. client = mqtt.Client("Temperature_Inside")
  6. client.connect(mqttBroker)
  7. while True:
  8. client.publish("ROBOT/ACTION/DRIVE")
  9. print("Just published to topic TEMPERATURE")
  10. time.sleep(0.5)