To use your Teensy or Teensy++ with the Arduino IDE, youwill need to install a few programs.Materials Required For TutorialsTeensy with Pins, $19Tutorial Parts Kit, $5Solderless Breadboard, $7USB Cable, $4Wire Stripping Tool (#22 size)Computer with USBInstall Teensy LoaderThe Teensy Loader applicationdownloads programs to your Teensy board and lets you run them.When you use Arduino, this will be done automatically, butdoing it manually is a simple way to check that your boardworks.
Just download the Teensy Loader and the LED Blink samples.No special installation is needed, just double click on theTeensy Loader to run it.You should see this window:
If you are using Linux, the 00-teensy.rulesfile must becopied to /etc/udev/rules.d/ to give non-root users permissionto access the Teensy USB device.Download LED BlinkNow you are ready to connect your Teensy.Plugging the Teensyinto your breadboard will protect its pins and give you a solidbase that doesn't move easily when you touch the cable.Thenjust plug in the USB cable and the LED should blink slowly.
When the Teensy boots up, it always runs whatever program hasbeen loaded.All new Teensy boards come with the slow LEDblink pre-loaded.
When you plugged in the cable, nothing happened with the TeensyLoader.You need to press the pushbutton to put your Teensyinto programming mode.When you press the button, the windowTeensy Loader should show your board.
Now you can load your Teensy with a different program.Usethe File->Open menu to open blink_fast.hex (available fromthe page where you downloaded the Teensy Loader).The bottomline will tell you which file is open and how much of the flashmemory it uses.
Just click the "Program" button to write this new code to yourTeensy, and then click the "Reboot" button to cause it to run.Your Teensy should be blinking rapidly.You have verifiedeverything works and you're ready to use it with Arduino.Install ArduinoThe next step is to download and install theArduino 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 diskimage containing the program.You must copy it to /Applicationsor your home directory.
Remember the location where you extracted or copied the Arduinosoftware, since you will need it shortly.Install TeensyduinoThe Arduino software does not come with support for the Teensy,so you must run the Teensyduino installerto add the Teensy files to your Arduino software.
The installer will only ask 1 question, the location of yourArduino software.The "Next" button will only activate until adirectory containing the Arduino software is selected.
Just continue clicking "Next" until the installation is completed.
If you are using Windows, you should also run thisWindows Serial Installer.If youchoose the "USB Serial" option, this will allow the Windows FoundNew Hardware Wizard to properly find the driver.Start Arduino & Choose The BoardNow you are ready to run Arduino.The first step is to selectthe board you will be using, from the Tools->Boards menu.This menu will have entries for Teensy because you ran theTeensyduino installer.
Open LED Blink ExampleThe Arduino Software comes with many examples.Use theFile->Examples->Digital->Blink menu to open the LED blinkexample.
Edit pin numberThe Teensy has its LED connected to a different pin, soyou 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 Loaderwill 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 downloadagain.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 beginattaching circuits to the Teensy and writing your own code tocontrol them!
Tutorial 2 will show you how toconnect and use a RGB LED.