Utiliser un arduino pour émuler un périphérique USB

PMorel
Messages : 3748
Inscription : 04 déc. 2013, 22:44
Localisation : Yutz

Utiliser un arduino pour émuler un périphérique USB

Message par PMorel »

Petit post à destination de Ntrs ...

Pour émuler un périphérique USB il est possible d'utiliser un arduino UNO sans le détruire :
http://mitchtech.net/arduino-usb-hid-keyboard/

Mais il est aussi possible d'utiliser un Teensy qui est justement fait pour :
http://www.pjrc.com/teensy/teensyduino.html
http://www.pjrc.com/teensy/td_keyboard.html
http://www.pjrc.com/teensy/td_joystick.html

Je dois avoir ça dans ma cave quelque part donc si ça t'intéresse (et que je le retrouve) je t'en ramène un ...

Et pour terminer il est possible d'utiliser un arduino pour programmer un autre arduino sans passer par l'USB :
https://www.arduino.cc/en/Tutorial/ArduinoISP
ntrs
Messages : 1628
Inscription : 20 févr. 2014, 14:15
Localisation : rond point merlin,Thionville
Contact :

Re: Utiliser un arduino pour émuler un périphérique USB

Message par ntrs »

Oui j ai déjà vu tout ces liens, je cherche quelqu un qui l'a déjà fait ;)
PMorel
Messages : 3748
Inscription : 04 déc. 2013, 22:44
Localisation : Yutz

Re: Utiliser un arduino pour émuler un périphérique USB

Message par PMorel »

Oui mais avec le Teensy tu n'as pas grand chose à faire. Pas besoin de changer le bootloader, c'est directement reconnu comme un périphérique USB ... mais il faut quand faire un peu de code ...
ntrs
Messages : 1628
Inscription : 20 févr. 2014, 14:15
Localisation : rond point merlin,Thionville
Contact :

Re: Utiliser un arduino pour émuler un périphérique USB

Message par ntrs »

ah oui tiens : The Teensy 2.0 has 12 analog input pins (11 are on the edge you can use with a breadboard), and the Teensy++ has 8. The original Teensy 1.0 did not have any analog inputs. Here are the analog capable pins.
Pascal
Messages : 482
Inscription : 13 oct. 2014, 21:45

Re: Utiliser un arduino pour émuler un périphérique USB

Message par Pascal »

Sinon si on veut rester sur Arduino ça existe en standard mais sur la Leonardo:

https://www.arduino.cc/en/Main/ArduinoBoardLeonardo :
The Leonardo differs from all preceding boards in that the ATmega32u4 has built-in USB communication, eliminating the need for a secondary processor. This allows the Leonardo to appear to a connected computer as a mouse and keyboard, in addition to a virtual (CDC) serial / COM port.
...

The Leonardo appears as a generic keyboard and mouse, and can be programmed to control these input devices using the Keyboard and Mouse classes.
La bibliothèque standard:

https://www.arduino.cc/en/Reference/MouseKeyboard

Il y a plein d'exemples dont:

https://www.arduino.cc/en/Tutorial/Keyb ... useControl
Répondre