The Universal Infrared Blaster PlatformIO project example provides an easy-to-use solution for developing firmware for the UIRB board with an ATmega328P microcontroller. A custom board definition for the UIRB V0.2 board simplifies development by leveraging PlatformIO's Atmel AVR platform and MiniCore. This repository includes everything needed to get started, such as hardware configurations, example firmware, and scripts for backing up EEPROM data with the urboot bootloader or a custom programmer like USBasp.
The Universal Infrared Blaster is a customizable development board designed for transmitting infrared signals and optionally receiving them with expansion boards. It enables the development of universal remote controllers, automation of IR devices, or exploration of microcontroller programming. PlatformIO simplifies project management and code building. (A link to the UIRB repository will be added in the future.)
The repository structure follows the basic PlatformIO project layout. Refer to the PlatformIO quickstart guide for more details.
platformio.ini
: The Project Configuration file for PlatformIO.
boards/
: Contains custom board configurations.uirb-v02-atmega328p.json
: Predefined settings for the UIRB V0.2 board.
include/
: Shared header files for the project.lib/
: Custom libraries for additional functionality.scripts/
: Utility scripts, such asbackup_eeprom.py
for managing EEPROM backups.src/
: Source code of the project.svd/
: System View Description files for debugging.test/
: Set up for unit testing using PlatformIO.uirb/
: Stores project-specific data, including EEPROM backups.
Before starting, ensure you have the following:
- Hardware: Universal IR Blaster (UIRB) board. [Details coming soon.]
- Tools: ICSP breakout expansion board and an ICSP AVR programmer like USBasp if a bootloader is not present on the board. See the fuses programming guide and bootloader programming guide for more details.
- Software: PlatformIO installed on your system.
git clone https://github.com/DjordjeMandic/UIRBpio.git
cd UIRBpio
- Default (
uirb-v02
):- Standard release build for the UIRB V0.2 board, using MiniCore with the urboot bootloader (defined in
uirb-v02-atmega328p.json
).
- Standard release build for the UIRB V0.2 board, using MiniCore with the urboot bootloader (defined in
- USBasp (
uirb-v02-usbasp
):- Standard release build for the UIRB V0.2 board, using the USBasp programmer instead of a bootloader.
- Debug (
uirb-v02-dbg
):- Debug build optimized for debugging.
- SimAVR (
uirb-v02-dbg-simavr
):- Debug build with simulation and debugging via SimAVR.
- AVR-Stub (
uirb-v02-dbg-avrstub
):- Debug build with serial debugging support via avr-stub.
The script backup_eeprom.py
adds custom targets for handling EEPROM data:
backupeep
: Reads and saves EEPROM data in binary format.archiveeep
: Consolidates EEPROM backups into a ZIP file.cleaneep
: Removes empty EEPROM backup directories.
- Connect Your Device: Ensure the UIRB board is connected to your computer (via COM port or ISP programmer).
- Select an Environment: Choose an environment (e.g.,
uirb-v02
,uirb-v02-usbasp
, etc.) using PlatformIO's interface or CLI. - Run Commands: Build, upload, or debug as needed:
platformio run -e uirb-v02 platformio upload -e uirb-v02 platformio debug -e uirb-v02-dbg
- Ensure your hardware is compatible with the selected environment.
- Manually specify the upload port for GDB debugging with avr-stub. This is a known limitation due to the
platform-atmelavr
issue #253. - If autodetection of the port based on hardware IDs fails, manually set the upload and monitor ports.
- Refer to the UIRBcore Library for additional documentation and examples.
- [Board documentation will be added soon.]
This project is licensed under the MIT License. See the LICENSE file for details.
If you encounter any issues, feel free to open an issue on this repository. Contributions are welcome!
Djordje Mandic. For more information, visit linktr.ee/djordjemandic.