NucleoF411RE-ApplicationShield

πŸŽ›οΈ Nucleo F411RE synth project!

NucleoF411RE-ApplicationShield is an open-source firmware project designed to leverage the Nucleo-F411RE development board in conjunction with the Application Shield from ARMmbed. This project explores all the functionalities offered by the combination of the Nucleo-F411RE and the Application Shield, providing a comprehensive codebase for testing and demonstrating the capabilities of the microcontroller.

🎯 Purpose

  • πŸ”Œ GPIO Control: Interact with GPIO pins for reading, writing values, and generating PWM signals.
  • ⏱️ Timer Management: Utilize timers to detect short and long button presses.
  • ⚑ Interrupt Handling: Implement timer and button press interrupts for dynamic LED control.
  • πŸ’¬ Serial Communication: Facilitate communication between the computer and the Nucleo board.
  • 🌑️ Sensor Interaction: Communicate via I2C and SPI to gather data from sensors and control displays.
  • πŸ”„ ADC Utilization: Read analog values from potentiometers.

πŸ“ Features

🏷️ Feature πŸ” Description
πŸ’‘ GPIO Control Read/write values and generate PWM signals.
⏲️ Timer Management Manage timers TIM2 to TIM5 for button presses.
⚠️ Interrupts Use interrupts for LED blinking and button actions.
πŸ’» Serial Communication Communicate with the Nucleo board via serial.
🌑️ I2C Communication Retrieve temperature from the LM75 sensor and interact with MMA7660 accelerometer.
πŸ“Ί SPI Communication Control an LCD display using SPI.
🎚️ ADC Usage Read potentiometer angles through ADC.

ApplicationShield Schematic

Nucleo-F411RE Extension Schematic

πŸŽ›οΈ Example Applications

1. PWM via LED

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.

2. GPIO Input via Joystick

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.

3. ADC Potentiometer Reading

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.

4. PWM via Speaker

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.”

5. Serial Communication

Establish serial communication between the Nucleo-F411RE and a PC for data exchange. This can be used for debugging, sending sensor readings, or receiving commands from the computer.

6. I2C Temperature Reading

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.

7. SPI LCD Control

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.

πŸ“œ Code Structure

πŸ“ NucleoF411RE-ApplicationShield/
β”œβ”€β”€ πŸ“‚ Core/
β”‚   β”œβ”€β”€ main.c        # Main firmware loop
β”‚   β”œβ”€β”€ gpio.c        # GPIO handling and PWM
β”‚   β”œβ”€β”€ timers.c      # Timer management
β”‚   β”œβ”€β”€ interrupts.c  # Interrupt handling
β”‚   β”œβ”€β”€ serial.c      # Serial communication control
β”‚   β”œβ”€β”€ i2c.c         # I2C communication
β”‚   β”œβ”€β”€ spi.c         # SPI communication for LCD
β”‚   β”œβ”€β”€ adc.c         # ADC handling
β”œβ”€β”€ πŸ“‚ Drivers/        # Nucleo HAL libraries
β”œβ”€β”€ πŸ“‚ Inc/           # Header files
β”œβ”€β”€ πŸ“‚ Assets/        # UI elements, example configurations
└── README.md         # This file