This repository demonstrates how to interface an RFID reader with an ESP32-S3 microcontroller and publish the RFID data to ROS2 using Micro-ROS.
| RFID Pin | ESP32-S3 Pin |
|---|---|
| SDA | GPIO 35 |
| SCLK | GPIO 36 |
| MOSI | GPIO 38 |
| MISO | GPIO 37 |
- The ESP32-S3 reads the UID from the RFID module and logs it to the serial monitor.
- The UID data is published to ROS2 using Micro-ROS with an
int32publisher.
To enable communication between the ESP32-S3 and ROS2, Micro-ROS is used. The following command runs the Micro-ROS agent in a Docker container:
docker run -it --rm --ipc host --network host --privileged microros/micro-ros-agent:humble serial -b 12000000 --dev /dev/ttyACM1- Connect the ESP32-S3 to your computer.
- Ensure the Micro-ROS agent is running using the command above.
- Monitor the published data in ROS2.
- ESP-IDF Framework: Install and configure the ESP-IDF for ESP32-S3 development.
- Micro-ROS: Ensure the Micro-ROS library is integrated into the ESP-IDF project.
- Docker: Required to run the Micro-ROS agent.
- ROS2: Installed on the host system (Humble Hawksbill).
-
Clone the repository:
git clone <https://github.com/Chinmay-ESP/RFID-ESP32.git>
-
Initialize and update submodules (if any):
git submodule update --init --recursive
-
Build and flash the ESP32-S3 project:
idf.py build idf.py flash idf.py monitor
-
Run the Micro-ROS agent on the host system (see command above).
- Real-time RFID data acquisition.
- Seamless integration with ROS2 through Micro-ROS.
- Lightweight and efficient implementation.