Firmware (Teensy)
A Makefile and Arduino project for building the Teensy Fan Controller firmware. Sources are contained in the teensy_fan_controller sub-folder.
The Makefile and project structure is based on Teensy 3.X Project Template.
Usage (Makefile)
Prepare the project (once), as described in Project Setup
Enter the
teensy_fan_controller
directory:Compile from source:
Makefile generates a Teensy 3.2 build by default, you may use a different Teensy by setting the TEENSY variable (either 30, 31, 32, 35, or 36).
Upload to Teensy 3.x:
Firmware Make targets:
make
alias formake hex
make build
compiles everything and produces a .elfmake hex
converts the elf to an intel hex filemake post_compile
opens the launcher with the correct filemake upload
uploads the hex file to a teensy boardmake reboot
reboots the teensy
Usage (Arduino Studio)
Prepare the project (once), as described in Project Setup
Copy
teensy_fan_controller/libraries/nanopb
into your user's Arduino libraries folder (fe.~/Documents/Arduino/libraries/
)Copy
teensy_fan_controller/libraries/PID
into your user's Arduino libraries folder (fe.~/Documents/Arduino/libraries/
)Launch Arduino Studio, and open project teensy_fan_controller/src/src.ino
Set Tools > Board to your Teensy board using the top menu
Set Tools > USB Type to Raw HID using the top menu
Build and upload firmware using Sketch > Upload, or by clicking the Upload button in the toolbar
Folder Structure
After the project is prepared, the teensy_fan_controller/
folder has the following structure:
teensy3
sub-folder is taken from The Teensy 3 Corestools
sub-folder is taken from Teensyduinosrc/src.ino
contains theloop()
andsetup()
functions, called byteensy3/main.cpp
src/*.{ino,c,h,cpp}
Teensy Fan Controller sourcesMakefile
file, copied and modified fromteensy3/Makefile
49-teensy.rules
file is taken from PJRC's udev rules
Last updated
Was this helpful?