Skip to content

Latest commit

 

History

History
19 lines (16 loc) · 793 Bytes

README.md

File metadata and controls

19 lines (16 loc) · 793 Bytes

Sensor Data Generator This Python script generates random sensor data (temperature and humidity) and saves it to a JSON file. It’s a simple example for educational purposes.

Usage Prerequisites: Make sure you have Python installed on your system. Clone or download this repository. Running the Script: Open a terminal or command prompt. Navigate to the directory where you’ve saved the script. Run the following command: python sensor_data_generator.py

The script will continuously generate random data and save it to a file named sensor_data.json. Customization: You can adjust the temperature and humidity ranges in the data() function. Modify the sleep interval (currently set to 5 seconds) if needed.

The result will be shown on the webpage displaying the temperature and humidity