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

Thread: Sending Data from Raspberry Pi via I2C to Teensy 3.6 in HID keyboard mode

  1. #1
    Junior Member
    Join Date
    Apr 2021
    Posts
    2

    Sending Data from Raspberry Pi via I2C to Teensy 3.6 in HID keyboard mode

    Hello,

    I'm working on a project where the big picture goal is to stream data from a raspberry pi 4 to a Teensy in HID keyboard mode to a computer screen.

    A button is pressed on the raspberry pi and the raspberry pi transmits characters to the Teensy and the Teensy then sends the same characters to a computer via HID keyboard mode. The characters appear in the program or interface on the computer (could be notepad, URL search bar, any interface really).

    Has anyone tried something like this, or seen anything like this before?

    There seem to be a few ways to do this, and here is what I'm thinking, but I'd like feedback.

    Raspberry Pi 4 ---------->
    If raspberry pi button is pressed then transmit characters, for example "I love Teensy" as I2C master (could be via serial or other means if needed). The raspberry pi code could be written in python, C++, or other.

    ----------> Teensy 3.6 in HID keyboard mode ------------>
    Data, for example "I love Teensy" is received as an I2C slave. This data is then buffered if needed, or sent directly to the computer. Code would be written in Teensyduino on the Arduino IDE.

    ----------> Laptop connected to Teensy via USB
    Computer is connected to the teensy via USB cable. Characters, for exampled "I love Teensy" are "typed" into the program(s) on the machine like notepad, terminal, excel, etc... and appear on the computer screen.

    Anyone tried anything like this before?

  2. #2
    Junior Member
    Join Date
    Apr 2021
    Posts
    2
    Hello,

    Does anyone here do paid project work? I'm willing to pay to get this going after signing a NDA.

    Is it possible to stream characters from a raspberry pi 4 to Teensy 3.6 in HID keyboard mode? Not sure, because in one sense, Teensy would be receiving the characters from the raspberry pi like in serial mode, while outputting as a keyboard (in keyboard mode).

    Regards,
    Sam

  3. #3
    Senior Member
    Join Date
    Aug 2013
    Location
    Gothenburg, Sweden
    Posts
    414
    Sending over a normal TTL serial port from Raspberry to Tensy and forwarding as keypresses over HID USB should be simple.

Posting Permissions

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