Carlos GS
/
blip_tecladoUSB
La MiniBlip se conectará como un teclado, y enviará un mensaje
main.cpp@0:156e1c4f7361, 2016-01-18 (annotated)
- Committer:
- carlosgs
- Date:
- Mon Jan 18 13:53:31 2016 +0000
- Revision:
- 0:156e1c4f7361
- Child:
- 1:8936f9e1d2b1
Primera version
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
carlosgs | 0:156e1c4f7361 | 1 | // basado en el codigo de Paclema: |
carlosgs | 0:156e1c4f7361 | 2 | // https://github.com/hack-miniblip/hack-miniblip.github.io/blob/master/ejemplos/miniblip_USBkeyboard/main.cpp |
carlosgs | 0:156e1c4f7361 | 3 | |
carlosgs | 0:156e1c4f7361 | 4 | #include "mbed.h" |
carlosgs | 0:156e1c4f7361 | 5 | #include "USBKeyboard.h" |
carlosgs | 0:156e1c4f7361 | 6 | |
carlosgs | 0:156e1c4f7361 | 7 | |
carlosgs | 0:156e1c4f7361 | 8 | USBKeyboard keyboard; |
carlosgs | 0:156e1c4f7361 | 9 | |
carlosgs | 0:156e1c4f7361 | 10 | int main() |
carlosgs | 0:156e1c4f7361 | 11 | { |
carlosgs | 0:156e1c4f7361 | 12 | PwmOut speaker(P0_8); |
carlosgs | 0:156e1c4f7361 | 13 | speaker=0.0; |
carlosgs | 0:156e1c4f7361 | 14 | |
carlosgs | 0:156e1c4f7361 | 15 | wait_ms(800); |
carlosgs | 0:156e1c4f7361 | 16 | keyboard.printf("Texto enviado desde la MiniBlip\n"); |
carlosgs | 0:156e1c4f7361 | 17 | } |