This repository contains various projects developed using the ESP32 microcontroller for a university course on microarchitecture. The projects are built using PlatformIO, a professional collaborative platform for embedded development.
- Introduction
- Prerequisites
- Projects
- Project 1: Control LED via MQTT
- Project 2: Light Control System
This repository showcases different microarchitecture projects implemented on the ESP32 development board. The projects demonstrate various functionalities such as GPIO control, sensor integration, and communication protocols.
This project demonstrates how to control an LED connected to the ESP32 using MQTT messages.
![IoT MQTT Panel](https://private-user-images.githubusercontent.com/77167918/335803803-a53657d9-9d22-4b30-bb02-47f0ab23bd4f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUyMzM1MzAsIm5iZiI6MTcyNTIzMzIzMCwicGF0aCI6Ii83NzE2NzkxOC8zMzU4MDM4MDMtYTUzNjU3ZDktOWQyMi00YjMwLWJiMDItNDdmMGFiMjNiZDRmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTAxVDIzMjcxMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQzZmI4MzlhYjdkNDA1ZTU0ZjVkMWM4ZmJiMGM5ZmVmMDBkYjRiYTMxNWQ1YWVkNTE3MjVhOTViM2Y4Yjk3Y2YmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.gN8AOuNbLldK-r4s_xsjGtZOs4Cmg6MkmsdF7wwbWsE)
![Off](https://private-user-images.githubusercontent.com/77167918/335803811-6d05f700-1b7e-445c-a82d-5934e0dc2bec.png?jwt=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DLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTAxVDIzMjcxMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI2ZThiYzY3YmY2OGMzZmZjYWI2OGI2NDI3ZGIzOTk5NjQxZjQ4ZDNmMzk1ZGUzZTljYzhlZTU4OTIwNTJiOTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.abHNCs0s88AigudhrgQKHi0beB92MxdTW03Yzpw7Uws)
This project demonstrates a light control system using an ESP32 microcontroller, an LED, and a Light Dependent Resistor (LDR). The system can operate in two modes: manual and automatic. In manual mode, the LED can be turned on or off via MQTT messages. In automatic mode, the LED brightness is adjusted based on the LDR readings. Additionally, the LDR value is published to an MQTT broker for real-time monitoring on a phone app.
![IoT MQTT Panel](https://private-user-images.githubusercontent.com/77167918/338958183-9f49af14-9031-41a4-a64b-27f086b12cdf.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUyMzM1MzAsIm5iZiI6MTcyNTIzMzIzMCwicGF0aCI6Ii83NzE2NzkxOC8zMzg5NTgxODMtOWY0OWFmMTQtOTAzMS00MWE0LWE2NGItMjdmMDg2YjEyY2RmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTAxVDIzMjcxMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdjMzhkOGVhY2E0NWYyOTJmYWU1MmU3YTgwNTNhZjllNTdkOWFiMmEzZGZlNGI5NDkxY2Y1NjlkNWI1ZmZkNjAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.jkmEEe2gj5UHuXCbMm7Is0gy52yR7YyrtPOyzzS-bNg)
![Off](https://private-user-images.githubusercontent.com/77167918/338958390-41d607fe-7245-4ed8-a4de-15d1bc9f11e6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUyMzM1MzAsIm5iZiI6MTcyNTIzMzIzMCwicGF0aCI6Ii83NzE2NzkxOC8zMzg5NTgzOTAtNDFkNjA3ZmUtNzI0NS00ZWQ4LWE0ZGUtMTVkMWJjOWYxMWU2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTAxVDIzMjcxMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE2OTlmMmU2MTI0MTRjOWQ4M2UxYzhlNDc4ZWYyY2E1MzhhYmM0Njk1MDQyMmU5ZDkyMGQzNTEzYTE2ZWJiMDcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Bs15TaBney5EWG_OkMkmK-objAgPhergjcMdLxHBSm0)
![On](https://private-user-images.githubusercontent.com/77167918/338958732-2cdea1c0-1b46-4a8f-ab15-a833cddd4f81.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUyMzM1MzAsIm5iZiI6MTcyNTIzMzIzMCwicGF0aCI6Ii83NzE2NzkxOC8zMzg5NTg3MzItMmNkZWExYzAtMWI0Ni00YThmLWFiMTUtYTgzM2NkZGQ0ZjgxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTAxVDIzMjcxMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWUxMWE3YWVjMTgwOTYxZmY0Zjk1YWYzNzQzN2VmNDFiNjI0YjA0ZjkzZGFlN2QwMGJiZjBiYTIxYjczYzUwM2ImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.2zqHlVe83W2uXyJm8BQYPWDianQXMOD9-ACRFCHstdw)
This project controls an LED connected to an ESP32 microcontroller. The system operates in two modes:
- Manual Mode: The LED can be turned on or off via MQTT messages.
- Automatic Mode: The LED brightness is adjusted based on the LDR readings, and the LDR value is published to the MQTT broker for monitoring.