Building an arduino powered beam with addressable LEDs, color and speed controls

Hardware

Software

In my daily life i don’t encounter a lot of hardware-close (embedded?) programming. The more i am interested to do projects like this and learn a bit of arduino programming from a typescript dev’s perspective.

Overcoming the Arduino IDE

Arduino runs on c++. Usually you would write your programs using Arduino IDE, which is specifically designed to make it easy for arduino n00bs to get in to it and load their first program onto the controller in no time. However this simplicity comes at the cost of flexibility, especially if you already have some experience in writing software: There is no proper linter, syntax highlighting or code formatting options. Also the amount of keyboard shortcuts is limited and not customizable. Being a JS Dev and thus naturally a VS Code fanboy this situation is not tolerable. Thats why i quickly switched to VS Code for developing arduino programs after getting really frustrated by the limitations of the Arduino IDE during my first few attempts. Using the official Arduino Extension for VSCode i finally was able for properly start writing the software for the led-beam with all the convenience i know and love from my daily typescript programming.

Project Structure

1
2
3
4
5
6
7
8
9
10
11
led-beam.ino
src/
├─ effects/
│ ├─ ...
├─ src/
│ ├─ index.css
│ ├─ index.js
├─ common.cpp
├─ common.h
├─ state.cpp
├─ state.h