TeenAstro Firmware Build
The code is maintained on github.
It consists of sources in the Arduino framework, used to build the firmware for the 3 processors in the system:
- Main Unit (Teensy 3.2 / Teensy 4.0)
- Focuser (Teensy 3.2)
- Smart Hand Controller (ESP8266 Wemos)
The recommended build environment is now PlatformIO. It is easy to install, takes care of compiler installations, Arduino framework, and works identically on Windows, OSX and Linux.
PlatformIO can be used either standalone from the command line, or it can be integrated into an IDE such as VSCode.
For each build, PlatformIO uses a configuration file called
platformio.ini, located at the root of the project. This file describes the processor, framework, and directories for sources and libraries.
To build from the command line, just type
pio run from the project root, and all targets are automatically rebuilt.
The executables are located in directory ./pio/target_name
For example, the Main Unit executable for board 240, with 5160 stepper driver is at
; PlatformIO Project Configuration File for TeenAstro Main Unit ; ; Defines the different board combinations [platformio] ; Uncomment this line to build just one version, comment it to build all default_envs = 240_5160 lib_dir = ../libraries src_dir = . build_dir = pio [env] platform = teensy framework = arduino extra_scripts = pre:rename_mu.py ; Release version number - used by rename_xx.py for renaming the executable custom_option1 = 122 [env:220] board = teensy31 build_flags = -DVERSION=220 [env:230] board = teensy31 build_flags = -DVERSION=230 [env:240_2130] board = teensy31 build_flags = -DVERSION=240 -DAxisDriver=2 [env:240_5160] board = teensy31 build_flags = -DVERSION=240 -DAxisDriver=3 [env:240_2160] board = teensy31 build_flags = -DVERSION=240 -DAxisDriver=4 [env:250_5160] board = teensy40 build_flags = -DVERSION=250 -DAxisDriver=3
Uploading the firmware
For the main unit, use platformio: type
pio run -t upload
For the SHC, upload with Wifi interface