UNO-D1-R32-ApplicationShield is an open-source firmware project based on ESP-IDF, designed to run on the UNO D1 R32 Board Module (ESP32) with the ARMmbed Application Shield. This project demonstrates the ESP32βs capabilities with practical examples using GPIO, ADC, PWM, I2C, SPI, and UART for embedded applications.
- π GPIO Control: Read/write digital pins and generate PWM signals using LEDC.
- β±οΈ Timer Management: Use hardware/software timers to detect button presses.
- β‘ Interrupt Handling: React to button or GPIO events using interrupts.
- π¬ UART Communication: Exchange data with a PC via UART for debugging or control.
- π‘οΈ Sensor Interaction: Use I2C/SPI to read sensors and control external devices.
- π ADC Utilization: Read analog input values such as potentiometer voltage.
Feature | Description |
---|---|
π‘ GPIO + PWM | Use gpio and ledc drivers for digital and PWM control. |
β²οΈ Timer Support | Use esp_timer or hardware timers for time-based events. |
Use gpio_install_isr_service for handling input events. |
|
π» UART Communication | Full duplex serial with uart_driver_install() . |
π‘οΈ I2C Sensors | Read LM75 temp sensor, MMA7660 accelerometer via I2C. |
πΊ SPI LCD | Display sensor or system data using SPI LCD. |
ποΈ ADC Readings | Use adc1_get_raw() with calibration for accurate values. |
Utilize PWM (Pulse Width Modulation) to control the brightness of an LED. By adjusting the duty cycle, the LED can be dimmed or brightened, allowing for various visual effects. This is particularly useful for applications such as light dimming or motor speed control.
Use the GPIO to read the logical levels from the joystick. The program update outputs such as LEDs based on the current status of the joystick buttons.
Use the ADC (Analog-to-Digital Converter) to read values from a potentiometer. These values can then be used to control parameters such as the brightness of an LED through PWM (Pulse-Width Modulation), allowing the LED intensity to vary according to the potentiometerβs position.
Utilize PWM (Pulse Width Modulation) to generate sounds via a speaker. By varying the frequency, not the duty cycle, different tones can be produced. The duty cycle remains constant while frequency changes create distinct audible notes. This method is commonly used for sound generation and simple audio signals."
Establish serial communication between the UnoD1R32 and a PC for data exchange. This can be used for debugging, sending sensor readings, or receiving commands from the computer.
Use the I2C protocol to communicate with temperature sensors such as the LM75. This data can then be used for environmental monitoring or to trigger actions based on temperature thresholds.
Use the SPI protocol to control an LCD display. This application could display system status, sensor readings, or any other relevant information on a small screen.
uno-d1-r32-appshield/
βββ main/
β βββ main.c # Main firmware entry point
β βββ gpio_ctrl.c # GPIO and PWM control logic
β βββ adc_ctrl.c # Analog input handling
β βββ timer_ctrl.c # Software/hardware timer handling
β βββ uart_comm.c # UART interface
β βββ i2c_ctrl.c # I2C communication
β βββ spi_display.c # LCD SPI control
β βββ include/ # Header files
βββ components/ # Optional external libs
βββ assets/ # Images, config files, schematics
βββ CMakeLists.txt
βββ README.md
This project is open-source. You are free to use, modify, and contribute.