🖊️
Teensy Fan Controller
  • Teensy Fan Controller
  • Usage
    • Fan Control
  • Hardware
    • Simple PCB
    • Breadboard
    • Prototype
  • Management UI
    • Overview
    • Controller Status
    • Hardware Setup
    • Fan Setup
    • Controller Log
  • Build Instructions
    • Project Setup
    • Firmware (Teensy)
    • Management UI
  • Demo
    • Router Cooling Demo
    • Water-cooled CPU and air-cooled GPU
  • Credits
    • Credits
Powered by GitBook
On this page
  • Usage (Makefile)
  • Usage (Arduino Studio)
  • Folder Structure

Was this helpful?

  1. Build Instructions

Firmware (Teensy)

PreviousProject SetupNextManagement UI

Last updated 5 years ago

Was this helpful?

A Makefile and Arduino project for building the Teensy Fan Controller firmware. Sources are contained in the .

The Makefile and project structure is based on .

Usage (Makefile)

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

  2. Enter the teensy_fan_controller directory:

     cd teensy_fan_controller
  3. Compile from source:

     TEENSY=35 make

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

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. Copy teensy_fan_controller/libraries/nanopb into your user's Arduino libraries folder (fe. ~/Documents/Arduino/libraries/)

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

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

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

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

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

  • src/src.ino contains the loop() and setup() functions, called by teensy3/main.cpp

  • src/*.{ino,c,h,cpp} Teensy Fan Controller sources

  • Makefile file, copied and modified from teensy3/Makefile

Prepare the project (once), as described in

teensy3 sub-folder is taken from

tools sub-folder is taken from

49-teensy.rules file is taken from

teensy_fan_controller sub-folder
Teensy 3.X Project Template
Project Setup
Project Setup
The Teensy 3 Cores
Teensyduino
PJRC's udev rules