Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: TeensyLC as HID + serial +USB OTG

  1. #1

    TeensyLC as HID + serial +USB OTG

    I have a TeensyLC in HID mode and a serial port (Serial2).

    I wrote code to take serial commands and turn them into HID events.

    I use an 8-byte packet that is read and decoded which uses Keyboard and Mouse libraries.
    The serial channel is used to send these messages and plain text messages back about what was decoded:
    moveRel 0, -1, 0
    moveRel -4, 0, 0
    moveRel -2, 0, 0
    moveRel -1, 0, 0

    That works when I plug it into my own computer (and my mouse moves around accordingly).
    However when I plug it into a phone using a USB OTG adapter, I get gibberish:

    But it is recognized as a keyboard (and presumably a mouse)
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Screen Shot 2019-07-09 at 1.05.12 PM.jpg 
Views:	13 
Size:	41.4 KB 
ID:	16944  
    Last edited by JasonH; 07-09-2019 at 07:31 PM. Reason: added recognized as a keyboard

  2. #2
    Nevermind! It worked on the same computer because the grounds are connected. To the phone, they were not. Connecting the FTDI ground to the Teensy ground resolved the issue.

    (I thought it was a voltage/baud thing)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts