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

Thread: Connecting a Teensy with RPi

  1. #1
    Junior Member
    Join Date
    Nov 2014

    Connecting a Teensy with RPi

    I've got a RPi with a sensor. If the sensor receives a signal, the software on the RPi needs to send a signal to the Teensy, which in response will send a keystroke to a PC. Speed is no issue, it will not happen more than once in 2 seconds. The number of of different signals the teensy would need to 'understand' and forward to the HID is a max of 6 different signals.

    sensor --> RPi --> Teensy --> PC

    My question is how to connect this together without causing power issues (if any).

    The RPi is powered via wall outlet adapter and connected using ethernet to a network. The RPi powers the sensor.
    The Teensy would be used to do the HID commands. The Teensy will be powered by the host PC.

    What would be the way to make the RPI send a signal to the Teensy? Can I simply connect their GPIO's and use those to send a signal to the Teensy? I was worried about the 2 different power supplies (1 from PC and 1 from a power outlet), do I need some isolation?

    Any feedback appreciated!

  2. #2
    Senior Member
    Join Date
    Jun 2013
    Torrance CA
    You can connect the RPi's ground & UART pins to the Teensy's and send the data serially, something like

    RPI Teensy
    6 (gnd) -> GND
    8 (TX) -> 0 (RX)
    10 (RX) -> 1 (TX)

    By happy coincidence those 3 RPi pins, in that order, plug directly in to the first 3 pins of a Teensy (all of this assumes you're using a T3.x or T-LC).

    If you want to be really safe put something like a 1K resistor on the serial lines between the RPi and the Teensy instead of directly connecting them; this will protect the pins from burning out in case something goes wrong in your software.

Posting Permissions

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