Skip to content

Instantly share code, notes, and snippets.

@tolgahancepel
tolgahancepel / mqtt-publish.py
Last active May 21, 2022 19:49
Monitoring IoT Sensor Data with Plotly Dash
import time
import paho.mqtt.client as mqtt
mqttc = mqtt.Client()
mqttc.connect("mqtt.eclipseprojects.io", 1883, 60)
if __name__ == "__main__":
print("Publishing...")
while True: