This project involves a QR code reading and control system using a combination of K210, ESP32, and ESP01 modules. The K210 reads QR codes and communicates the data to an ESP32 via serial UART. The ESP32 then sends this data to an MQTT topic. An ESP01 subscribed to this MQTT topic controls a relay module based on the received MQTT messages.
TODO
- K210 Ports:
- TX = 10
- RX = 15
- ESP32 Ports:
- RX2 = 16
- TX2 = 17
- ESP01 Ports:
- Relay = 0
- K210 reads QR codes and sends data to ESP32 via UART.
- ESP32 forwards QR code data to MQTT topic.
- ESP01 listens to MQTT topic and controls a relay based on the topic's messages.
- Publisher: ESP32 sends QR code data.
- Subscriber: ESP01 subscribes and reacts to the MQTT topic.
- Connected to ESP01.
- Controls a Mini Solenoid Electronic Lock (12V).
- Connect the K210 to ESP32 using UART (K210 TX to ESP32 RX2, and K210 RX to ESP32 TX2).
- Connect the relay module to the ESP01.
- Set up the MQTT broker and configure the ESP32 and ESP01 to connect to it.
- Add credentials for the MQTT broker and wifi, using the
credentials.hpp.template
file founded in publisher/host and subscriber/host. - Deploy the code to each module.
- Scan a QR code with the K210.
- The QR code data should be sent to the MQTT topic and the ESP01 should react to it by controlling the relay module.