Go Down

Topic: Newbe / Novato. Leonardo USB <-> PC (Read 495 times) previous topic - next topic

EA3BIL

Hi,
I've been reading posts for about 3 days and I can't get trough about a simple question:
Can the integrated USB port be used for communicating to PC (not for programming, I mean)  ??

Hola,
He estado leyendo durante 3 días mensajes y no consigo encontrar respuesta a una pregunta sencilla:
Puede usarse el puerto USB implementado para comunicarse con un PC (no sólo para su programación) ??


Thanks for helping,
Gracias por vuestra ayuda,

Rafa.

Nick Gammon

The Leonardo port can be configured to pretend to be a keyboard, mouse, joystick etc. Look at some of the examples that come with the IDE.
http://www.gammon.com.au/electronics

Krodal

Yes, but using the serial monitor of the IDE is recommended.

The Leonardo is able to use the USB plug for the serial monitor and USB emulation and sketch upload. All at the same time.

If you want a normal serial communication with a different program, you might want to turn off the USB emulation. The baudrate can't be set high, since it is a software serial communication.

The Leonardo's hardware serial port is Serial1 on pin 0 and 1. If you use a USB-to-serial-TTL-level adapter for that, you could use that port. In that way you can still use the serial monitor of the IDE and have a good serial communication with an other device.

Go Up