Welcome to the STM32 PlatformIO Playground! This repository serves as a hands-on learning environment to explore various STM32 peripherals using PlatformIO as the sole IDE. The examples range from basic tasks like LED blinking to advanced peripheral operations such as UART communication, PWM, and more.
STM32-PlatformIO-Playground/
├── README.md - Overview and instructions for the repository.
├── LICENSE - Licensing terms for the repository.
├── .gitignore - Ignored files and folders for version control.
├── examples/ - Peripheral-specific example projects.
│ ├── 01_LED_Blink/ - LED blink example using GPIO.
│ ├── 02_Button_Press/ - Button press and LED control example.
│ ├── 03_PWM_Signal/ - PWM signal generation example.
│ ├── 04_UART_Comm/ - UART communication example.
│ └── ... - Future examples to be added here.
-
Hardware:
- STM32 Nucleo F030R8 (or other STM32 boards).
- Jumper wires, LEDs, buttons, etc., as required by the examples.
-
Software:
- PlatformIO Core.
- A text editor like VS Code with the PlatformIO extension.
-
Clone this repository:
git clone https://github.com/yourusername/STM32-PlatformIO-Playground.git cd STM32-PlatformIO-Playground
-
Navigate to an example folder:
cd examples/01_LED_Blink
-
Open the project in PlatformIO:
pio project init --board nucleo_f030r8
-
Build and upload the code:
pio run --target upload
-
Monitor the serial output (if applicable):
pio device monitor --baud 115200
Learn how to blink an LED using GPIO. This example demonstrates configuring pins as outputs and toggling them at a fixed interval.
Control an LED using a button. This example introduces GPIO input handling and basic debouncing.
Generate a PWM signal to control devices like servo motors or LEDs. You'll learn how to configure timer peripherals for PWM.
Set up serial communication to transmit and receive data between the STM32 board and your computer.
More examples will be added for peripherals like I2C, SPI, ADC, and advanced applications.
Feel free to contribute new examples, improve existing ones, or suggest enhancements. Follow these steps to contribute:
- Fork this repository.
- Create a branch for your feature or bug fix.
- Commit your changes and submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
Thanks to the open-source community for making tools like PlatformIO and STM32CubeMX available for free use.