|Shopping Cart Checkout Shipping Cost Download Website|
|You are here: Teensy Tutorial Setup|
Tutorial 1: Software SetupTo use your Teensy or Teensy++ with the Arduino IDE, you will need to install a few programs.
Materials Required For Tutorials
Install Teensy LoaderThe Teensy Loader application downloads programs to your Teensy board and lets you run them. When you use Arduino, this will be done automatically, but doing it manually is a simple way to check that your board works.
Just download the Teensy Loader and the LED Blink samples. No special installation is needed, just double click on the Teensy Loader to run it. You should see this window:
If you are using Linux, the 49-teensy.rules file must be copied to /etc/udev/rules.d/ to give non-root users permission to access the Teensy USB device.
Download LED BlinkNow you are ready to connect your Teensy. Plugging the Teensy into your breadboard will protect its pins and give you a solid base that doesn't move easily when you touch the cable. Then just plug in the USB cable and the LED should blink slowly.
When the Teensy boots up, it always runs whatever program has been loaded. All new Teensy boards come with the slow LED blink pre-loaded.
When you plugged in the cable, nothing happened with the Teensy Loader. You need to press the pushbutton to put your Teensy into programming mode. When you press the button, the window Teensy Loader should show your board.
Now you can load your Teensy with a different program. Use the File->Open menu to open blink_fast.hex (available from the page where you downloaded the Teensy Loader). The bottom line will tell you which file is open and how much of the flash memory it uses.
Just click the "Program" button to write this new code to your Teensy, and then click the "Reboot" button to cause it to run. Your Teensy should be blinking rapidly. You have verified everything works and you're ready to use it with Arduino.
Install ArduinoThe next step is to download and install the Arduino Software.
On Windows and Linux, the software is simply a large ZIP file. You will need to extract it.
On Macintosh, starting with version 0017, the software is a disk image containing the program. You must copy it to /Applications or your home directory.
Remember the location where you extracted or copied the Arduino software, since you will need it shortly.
Install TeensyduinoThe Arduino software does not come with support for the Teensy, so you must run the Teensyduino installer to add the Teensy files to your Arduino software.
The installer will only ask 1 question, the location of your Arduino software. The "Next" button will only activate until a directory containing the Arduino software is selected.
Just continue clicking "Next" until the installation is completed.
If you are using Windows, you should also run this Windows Serial Installer. If you choose the "USB Serial" option, this will allow the Windows Found New Hardware Wizard to properly find the driver.
Start Arduino & Choose The BoardNow you are ready to run Arduino. The first step is to select the board you will be using, from the Tools->Boards menu. This menu will have entries for Teensy because you ran the Teensyduino installer.
Open LED Blink ExampleThe Arduino Software comes with many examples. Use the File->Examples->Digital->Blink menu to open the LED blink example.
Edit pin numberThe Teensy has its LED connected to a different pin, so you will need to change the pin number. Find the line "int ledPin = 13;" and change the number.
Teensy 2.0 has the LED on pin 11.
Teensy++ 2.0, Teensy++ 1.0 and Teensy 1.0 have the LED on pin 6.
Compile and DownloadTo compile this code, click the "Verify" button.
A message will appear showing the compiled size. The Teensy Loader will automatically update with the new file.
Just press the button on the Teensy to program the code.
You can try changing the delay times. Just recompile and download again. When the Teensy is running a previously loaded program, you can also use the Upload button.
Now that you have the software set up, you're ready to begin attaching circuits to the Teensy and writing your own code to control them!
Tutorial 2 will show you how to connect and use a RGB LED.