This project demonstrates the implementation of a distributed system using three ESP8266 microcontrollers. The setup involves one microcontroller collecting sensor data, another processing the data, and a third displaying the processed results on an OLED display.
To replicate this distributed system, you will need the following components:
- Three ESP8266 microcontrollers
- USB-to-serial adapter (e.g., FTDI adapter)
- Sensor (e.g., temperature sensor)
- OLED display
-
Sensor Connection:
- Connect the sensor to the ADC (analog-to-digital converter) of one ESP8266 microcontroller.
-
OLED Display Connection:
- Connect the OLED display to the I2C bus of another ESP8266 microcontroller.
-
USB-to-Serial Connection:
- Connect all three ESP8266 microcontrollers to your computer using the USB-to-serial adapter.
Follow these detailed steps to use the distributed system effectively:
-
Burn MicroPython Firmware:
- Utilize the esptool utility to burn the MicroPython firmware to each ESP8266 microcontroller.
- Refer to the MicroPython documentation for firmware burning instructions.
-
Upload Code:
- Use a tool like ampy to upload the code for each microcontroller.
- Check the ampy documentation for code uploading guidance.
-
Configure Display Microcontroller:
- Ensure that the IP address and port of the HTTP server in the code for the display microcontroller match the server microcontroller's IP address and port.
-
Power On:
- Power on all three ESP8266 microcontrollers and the OLED display.
- The OLED display should start showing the processed value of the sensor data.
Feel free to customize the code to meet specific needs:
- Modify communication protocols.
- Add extra processing steps.
- Adjust display output according to requirements.
This distributed system serves as a foundation for more complex IoT projects. Explore and adapt the codebase to suit your unique applications and extend the functionalities of the system.