Tutorials¶
This section provides step-by-step tutorials to help you learn the Nexus platform through practical examples.
Tutorial Contents
- Your First Nexus Application
- Learning Objectives
- Prerequisites
- Step 1: Create Project Structure
- Step 2: Add Nexus as Dependency
- Step 3: Create CMakeLists.txt
- Step 4: Write Your First Application
- Step 5: Build for Native Platform (Testing)
- Step 6: Build for STM32F4
- Step 7: Flash to Hardware
- Step 8: Verify Operation
- Understanding HAL Initialization
- GPIO Configuration Options
- Common Issues and Solutions
- Next Steps
- Additional Exercises
- Best Practices
- Resources
- GPIO Control Tutorial
- UART Communication Tutorial
- Multi-Tasking with OSAL
- 中断处理教程
- 定时器和 PWM 教程
- SPI 通信教程
- I2C Sensor Integration
- ADC Sampling and Signal Processing
- Example Applications
Learning Path¶
If you’re new to Nexus, follow these tutorials in order:
Beginner Tutorials (Weeks 1-2)¶
Your First Nexus Application - Build your first Nexus application from scratch
GPIO Control Tutorial - Learn GPIO control and LED operations
UART Communication Tutorial - Add serial communication to your application
Multi-Tasking with OSAL - Create multi-task applications using OSAL
Intermediate Tutorials (Weeks 3-4)¶
中断处理教程 - Master interrupt handling and event-driven programming
定时器和 PWM 教程 - Timer and PWM control (LED dimming, servos, motors)
SPI 通信教程 - SPI communication and peripheral control
Advanced Tutorials (Weeks 5-6)¶
I2C Sensor Integration - Read sensor data using I2C protocol
ADC Sampling and Signal Processing - Analog signal acquisition and processing
DMA Transfers - Efficient data transfer techniques
Multi-task Synchronization - Advanced OSAL synchronization mechanisms
State Machine Design - Build robust state machine applications
Project Tutorials (Weeks 7-8)¶
Weather Station Project - Complete system integrating multiple sensors
Data Logger - Data acquisition and storage system
Motor Control System - Closed-loop motor control
IoT Device - Smart device connected to cloud platforms
Each tutorial builds on concepts from previous ones, so we recommend following them in order.
Prerequisites¶
Before starting these tutorials, ensure you have:
Completed the Environment Setup guide
A supported development board (STM32F4 Discovery recommended)
Basic knowledge of C programming
Familiarity with embedded systems concepts
Learning Stages¶
Stage 1: Fundamentals (1-2 weeks)¶
Complete beginner tutorials 1-4
Understand HAL and OSAL basic concepts
Able to create simple applications
Stage 2: Intermediate Skills (2-3 weeks)¶
Complete intermediate tutorials
Master interrupt and event-driven programming
Understand peripheral communication protocols
Stage 3: Advanced Applications (3-4 weeks)¶
Study advanced tutorials
Implement complex multi-task systems
Optimize performance and power consumption
Stage 4: Real Projects (4+ weeks)¶
Complete project tutorials
Build complete embedded systems
Apply best practices
Additional Resources¶
Hardware Abstraction Layer (HAL) - HAL API Reference
OS Abstraction Layer (OSAL) - OSAL API Reference
Config Manager - Configuration Management
Shell Framework - Shell/CLI Framework
Testing - Testing Your Application
Example Applications¶
See Example Applications for complete example applications, including:
blinky - Basic GPIO control
config_demo - Configuration management demonstration
freertos_demo - Multi-task OSAL demonstration
shell_demo - Command-line interface demonstration
Getting Help¶
If you encounter issues:
Check Frequently Asked Questions for common questions
Review Debugging Guide debugging guide
Consult platform-specific documentation
Examine example code
Ask on GitHub Discussions
Next Steps¶
After completing tutorials:
Explore User Guide for in-depth documentation
Review Platform Guides for platform-specific features
Check API Reference for complete API reference
Join the community and share your projects!