Using teensyduino on Arduino

Hi, I am trying to use keyboard.print using Arduino and for that I think that I need to install teensyduino, I install it and then it was this

Please press the RESET BUTTON on your Teensy to upload your sketch. Auto-reboot only works if the Teensy is running a previous sketch.

I don't know what else I can do. Can help me to use keyboard.print() function? I am trying to do a keyboard, so when I press the button I will see a letter in the screen.
Thanks.

Which board are you using?

Arduino UNO

Teensyduino only works with Teensy boards. I have no idea how to get an Uno to behave as a keyboard but I can definitely say that you are barking up the wrong tree.

Would this work for your application...

Well I see the awesome button of Make magazine and it saids that I need to download teensy loader and teensyduino

It also says...

How is it made? At the core of The AWESOME Button is the Teensy USB, a really sweet* microcontroller that has the ability to act like a USB mouse or keyboard right out of the box.

It doesn't say anything about using an Uno. It just says you can program the Teensy using the Arduino IDE.

So I need to have Teensy.

I can program Teensy with the arduino environment, but not download programs of Teensy to Arduino.

In other words Teensy is an Arduino with more programable features.

Thanks to all.

Gerdelamora:
So I need to have Teensy.

I can program Teensy with the arduino environment, but not download programs of Teensy to Arduino.

In other words Teensy is an Arduino with more programable features.

Thanks to all.

You can do it with an uno (it's a little tough, but I suspect it's about the same toughness as the teensy). This link may help: http://hunt.net.nz/users/darran/weblog/faf5e/

Thanks WizenedEE but I think buying a Teensy is better, another question, How to do the hardware? I suppose it won't be dificult, because there are switches I only need to declare it with the letter that will print or not.

How to do the hardware? I suppose it won't be dificult, because there are switches I only need to declare it with the letter that will print or not.

Just connect your pushbutton between any digital pin and GND. Run the Teensyduino installer. In File > Examples > Teensy > USB_Keyboard > Buttons you'll find an example that should get you started.

WizenedEE:
You can do it with an uno (it's a little tough, but I suspect it's about the same toughness as the teensy).

Actually, this is so very easy on Teensy, not anything like the difficulty on Uno!

The Teensyduino installer adds a "USB Type" sub-menu into the Tools menu. The installer is a free download, so even if you don't own a Teensy board, you can at least install it and see what this new menu looks like. It also puts several examples in File > Examples > Teensy > USB_Keyboard.

All you do is select "Keyboard + Mouse + Joystick" from the Tools > USB Type menu. Then add a "Keyboard.print(whatever)" in your sketch, and upload. When your sketch begins running, Teensy becomes a USB Keyboard (and also a mouse and joystick), and it will type whatever you put in that Keyboard.print().

While it's acting as a keyboard, there's also an emulated serial channel. So you can still use Serial.print() mixed anywhere in your sketch that's also using Keyboard.print(). The Keyboard stuff is typed as a USB keyboard, and the Serial stuff goes to the Arduino Serial Monitor.

When you want to make changes, just edit the code and click Upload. It's that simple.

Compare with doing the same on Uno. First, you have to prepare the sketch, where you use Serial.print(var, 8) to send 8 byte messages to the other code that will run on the 8u2 chip. Upload that normally. Then you reprogram the 8u2 chip using DFU programmer or Flip - which is very non-Arduino like. Now your Uno will be a keyboard.

Hopefully you got the sketch perfect! If not, there's no way to use Serial.print to the Arduino Serial Monitor, since Serial.print is consumed to send instructions to the 8u2 chip for which keys to type. So instead you'll probably wire up some LEDs to the pins to get some idea of what your sketch is doing.

With Uno, you can't just click upload when you reprogram your sketch (probably to light those LEDs differently so you can what what its doing). First you have to reprogram the 8u2 chip its original serial code. Then your Uno can be uploaded again. Upload your next attempt. Then reprogram the 8u2 chip again to keyboard mode.

Teensyduino makes this whole process so very easy and pretty much exactly what you'd expect Arduino to be like. Just change your code and click Upload. Keyboard.print() and Serial.print() both work at the same time.

One word of caution, which applies equally to both: SAVE YOUR WORK!! With Serial only, if your board spews a ton of data, you just close the serial monitor. With a keyboard, it can quickly type over all your work before you hold the reset button to stop it. Always save your work before uploading a sketch that becomes a USB keyboard.