A Swift-based LED matrix controller for ESP32-C6, featuring multiple stunning animation effects. This project demonstrates the power of Swift in embedded systems development.
- 🎨 Multiple animation effects:
- Rainbow wave effect with smooth color transitions
- Matrix rain effect (Matrix-style)
- Spiral pattern with color cycling
- ⚡ Smooth animation transitions
- 🛠️ Modern Swift codebase
- 📱 10x6 LED matrix support
- Seeed XIAO ESP32C6 board
- WS2812B LED strip (60 LEDs)
- 5V power supply
- Data wire (connected to GPIO0)
0 1 2 3 4 5
6 7 8 9 10 11
12 13 14 15 16 17
18 19 20 21 22 23
24 25 26 27 28 29
30 31 32 33 34 35
36 37 38 39 40 41
42 43 44 45 46 47
48 49 50 51 52 53
54 55 56 57 58 59
- Swift 6.1 or later
- ESP-IDF (Espressif IoT Development Framework)
- Clone the repository:
git clone https://github.com/CmST0us/swift-embedded-xiao-esp32c6-led_board.git
cd swift-embedded-xiao-esp32c6-led_board
- Install dependencies:
idf.py set-target esp32c6
- Build the project:
idf.py build
- Flash to ESP32-C6:
idf.py flash
-
Hardware Setup:
- Connect the LED strip data wire to GPIO0
- Ensure proper 5V power supply
-
Running the Program:
- The program automatically starts and cycles through animations
- Each effect has a 500ms transition delay
You can customize the animations by modifying Main.swift
:
// Current brightness setting (5)
ledStrip.setPixel(index: i, r: 5, g: 5, b: 5)
// Current delay between frames (50ms)
delay_ms(50)
Create a new function following the pattern:
func newEffect(ledStrip: LEDStrip) {
// Your animation code here
}
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Project Link: https://github.com/CmST0us/swift-embedded-xiao-esp32c6-led_board