Ladyada.net and Arduino.cc make this *really* easy.
Getting started with the Teensy Board. I'm running Linux and using a Teensy 2.0, so these directions occasionally need minor tweaks for other operating systems or boards.
- Get everything ready. Make sure you have all the right hardware and that you know which drivers you need.
- I'm using Linux, so I open a terminal and use this command: uname -a
- Check the results of that command for the kernel version (mine is 2.6.32). If your result does not begin with 2.6, you're using an old kernel and may not be able to proceed.
- Also check those results to confirm whether you're on a 32 or 64 bit system. My uname -a says "x86_64," so I know I'm using a 64 bit system. My system at home returned "i686", which means I was using a 32 bit system.
- Download the appropriate Arduino software for your machine.
- Unpack the software. Here's the command I run from my home directory: tar -xvf ~/Downloads/arduino-1.0.2-linux64.tgz
- Sometimes the Linux installers include a program called brltty, which makes the Arduino software not work. Remove this program with the following command (in Linux): sudo apt-get remove brltty
- Now, there will be an arduino folder in your home directory (mine is at: ~/arduino-1.0.2)
- Run the arduino software to make sure it works. ~/arduino-1.0.2/arduino
- Close the arduino software, so you can install some extra files to make it work for the Teensy board.
- Download the Teensyduino software that's right for your machine.
- Linux users should also save this to file as "49-teensy.rules" -- my machine tries to be helpful and name it "49-teensy.rules.text", which gives you extra steps later on, so avoid this or rename it after you download it if you have to.
- Linux users will likely need to update the udev rules. Use this command (from the directory where the 49-teensy.rules file is: sudo cp 49-teensy.rules /etc/udev/rules.d/
- Make the Teensyduino software executable! You can checkout chmod if you're not familiar with it to make sure this is how you want to do it. Run the chmod command in the folder where you installed the Teensyduino software. chmod 755 ./teensyduino.64bit
- Run the Teensyduino Installer
- Choose where your sketchbook (Teensyduino code) should go
- Install libraries (I install all of them)
- When it's finished, click "Done."
- Run your arduino software again (step #9)
- Choose your board: Tools --> Board --> Teensy 2.0
- I'm using my Teensy board as a USB Keyboard, so I choose that USB Type from the Tools menu as well. Tools --> USB Type --> Keyboard + Mouse + Joystick
- Confirm that you've got the right keyboard language: Tools --> Keyboard Layout --> US English
The example code can be really useful. The program I needed was simple, so I just chose example code, altered it a little and now the board does exactly what I need it to!
To run example code:
- Start up your arduino software as usual (step #9).
- Then, choose File --> Examples --> Teensy --> choose something! I started with USB Keyboard --> Simple
- Click the "Verify" button (it looks like a checkmark)
- Load it to the board (which, obviously, needs to be plugged in. . .) with the button that looks like an arrow pointing to the right.
- It usually runs the newly-installed program right away, but if it doesn't, you can unplug the Teensy (after it's completed its flash/reboot) and plug it back in to get it to run the program.
I also recommend checking out Arduino's site for more "How-To"s. They've done a great job!
No comments:
Post a Comment