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

Thread: Serial communication and HID

  1. #1
    Junior Member
    Join Date
    Apr 2017
    Posts
    1

    Serial communication and HID

    Hi!
    I'm currently working on a project which require teensy to be a HID device but at the same time recieve commands from serial port. Will this be possible?
    I'm thinking that I need to use the serial pins on the board to communicate and the micro usb as HID.

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    6,863
    Should work no problem - serial port is independent.

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    18,355
    Quote Originally Posted by 1461748123 View Post
    project which require teensy to be a HID device but at the same time recieve commands from serial port. Will this be possible?
    I'm thinking that I need to use the serial pins on the board to communicate and the micro usb as HID.
    Yes, this is possible. When using Arduino with Teensy selected, the Tools > USB Type menu controls which type of USB device Teensy becomes when your code uploads.

    Some of the options have USB serial and also HID interfaces.

    All of them can work together with the regular hardware serial ports (1 on old Teensy 2.0, 3 of them on Teensy LC & 3.2, and 6 of them on Teensy 3.5 & 3.6). Details here:

    https://www.pjrc.com/teensy/td_uart.html

    All of these hardware serial ports are independent of the USB (nothing like Arduino Uno) and can have simultaneous data flow while you're using the USB to communicate.

Posting Permissions

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