Firmware (Teensy)

A Makefile and Arduino project for building the Teensy Fan Controller firmware. Sources are contained in the teensy_fan_controller sub-folderarrow-up-right.

circle-info

The Makefile and project structure is based on Teensy 3.X Project Templatearrow-up-right.

Usage (Makefile)

  1. Prepare the project (once), as described in Project Setup

  2. Enter the teensy_fan_controller directory:

     cd teensy_fan_controller
  3. Compile from source:

     TEENSY=35 make
circle-info

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).

  1. Upload to Teensy 3.x:

      make upload
circle-info

Firmware Make targets:

  • make alias for make hex

  • make build compiles everything and produces a .elf

  • make hex converts the elf to an intel hex file

  • make post_compile opens the launcher with the correct file

  • make upload uploads the hex file to a teensy board

  • make reboot reboots the teensy

Usage (Arduino Studio)

  1. Prepare the project (once), as described in Project Setup

  2. Copy teensy_fan_controller/libraries/nanopb into your user's Arduino libraries folder (fe. ~/Documents/Arduino/libraries/)

  3. Copy teensy_fan_controller/libraries/PID into your user's Arduino libraries folder (fe. ~/Documents/Arduino/libraries/)

  4. Launch Arduino Studio, and open project teensy_fan_controller/src/src.ino

  5. Set Tools > Board to your Teensy board using the top menu

  6. Set Tools > USB Type to Raw HID using the top menu

  7. 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:

Last updated