This project implements a Bluetooth Low Energy (BLE) based traffic sign system using ESP32 microcontrollers. The system allows for wireless communication between traffic signs and vehicles, enabling smart traffic management and safety features.
The project consists of two main components:
- Traffic Sign Emitter: An ESP32 device that broadcasts traffic sign information using BLE advertising
- Vehicle Receiver: An ESP32 device that receives and processes the traffic sign information
- ESP32 Development Boards
- Power supply for the traffic signs
- Vehicle-mounted ESP32 for receiving signals
ble_advertising.py: Handles BLE advertising payload generation and decodingbluetooth_library.py: Core Bluetooth functionality implementationesp32advertise.py: ESP32-specific advertising implementationBluetooth_Receiver.py: Vehicle-side receiver implementation
- Custom BLE advertising payloads for traffic sign information
- Support for multiple service UUIDs
- Custom data field for additional sign information
- Efficient payload encoding/decoding
- Configurable advertising parameters
The system uses MicroPython's ubluetooth library for BLE communication. The traffic signs broadcast their information using BLE advertising packets, which include:
- Sign type/identifier
- Custom data payload
- Service UUIDs
- Device name
The vehicle receiver scans for these advertisements and processes the received data to display relevant information to the driver.
- Flash your ESP32 devices with MicroPython
- Upload the required Python files to your devices
- Configure the traffic sign emitter with appropriate sign information
- Set up the vehicle receiver to scan for and process the advertisements
For detailed information about the Bluetooth implementation, refer to:
- MicroPython ubluetooth Documentation
- ESP32 Manual (included in the project files)
- Our implementation Documentation
.
├── README.md
├── ble_advertising.py # BLE advertising payload handling
├── bluetooth_library.py # Core Bluetooth functionality
├── esp32advertise.py # ESP32-specific advertising
├── Bluetooth_Receiver.py # Vehicle-side receiver
└── ESP 32 Manual.pdf # Hardware documentation
Feel free to submit issues and enhancement requests. For major changes, please open an issue first to discuss what you would like to change.