Programming the Teensy 3.0 Microcontroller

These steps are not relevant to using the TiltyIMU Demo program. They are for setting up custom programming of the Teensy 3.0 via Arduino.

1.Download and install the Arduino IDE 1.0.5 fromhere.

2.Download and follow the installation instructions for Teensyduino fromhere. Teensyduino is the add-on for the Arduino IDE that enables programming the ARM microcontroller used by the Teensy 3.0. Also feel free to install any/all of the software libraries Teensyduino can install when offered.

3. Open the Arduino IDE and in the file menu go to Tools > Board: > Teensy 3.0.

4. Also in the Tools menu, change the "Serial Port:” option to the Teensy’s comm port. If you don’t know what that is, click outside the menu, unplug the Teensy, go back to the menu and make a note of what’s listed. Then exit the menu again, plug the Teensy back in, and when you go back to the menu the Teensy’s comm port should be the only new one.

5. You’re ready to go! The Teensy 3.0 can be programmed just like any other Arduino board. And there’s a number of examples under File > Examples > Teensy, in addition to all of the examples provided for various software libraries.

Optionally...You can also install my software libraries with examples of how to use the TiltyIMU sensors. Simply download and unzip them, then put them in your Arduino Libraries folder (which is probably in your“Documents” folder). They may try to overwrite a couple of libraries installed by Teensyduino, but that is ok.

  • MPU6050 - The library for using the inertial motion sensor on the TiltyIMU.Uses i2c_t3
  • MPL3115A2 - The library for using the altimeter on the TiltyIMU. Uses i2c_t3
  • HMC5883 - The library for using the compass sensor on the TiltyIMU. Uses i2c_t3
  • i2c_t3 - A drastically improved Wire library for the Teensy 3.0. This is used by most of my sensor libraries. Documentation can be found here.
  • FreeIMU - An alternate library for reading the motion sensor used by the TiltyIMU.Documentation can be foundhere.
  • I2Cdev - Library used by a variety of others for communicating with I2C sensors. More information on the I2Cdev project can be found here.
  • PID - A library to simplify the creation and control of Proportional / Integral / Derivative control loops.
  • Encoder - Library to read quadrature encoders. This software isn’t actually used by the Teensy on the TiltyIMU, but is used on the Dual Motor Driver add-on. Documentation on the library can be found here.
  • SpiFlash - Library to interface with the flash memory chip on the TiltyIMU boards. This library isn’t quite finished, but it is functional and is used by the TiltyIMU Demo program.

And to give credit where it’s due… I did not write all of these libraries from scratch. Several of them existed previously and I merely ported them to use the superior capabilities of the Teensy 3.0.