Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Add files via upload
# Publisher function for temperature def publish_temperature_data(client): while True: temperature = random.uniform(18.0, 30.0) # Simulate temperature in Celsius message = f"{temperature:.2f}" client.publish(temperature_topic, message) print(f"Published Temperature: {message} °C") time.sleep(5) # Publish every 5 seconds
- Loading branch information