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

Thread: teensy as trackball/spinner device?

Hybrid View

  1. #1

    teensy as trackball/spinner device?

    I want to build a trackball + spinner panel for one of my simulator games. I thought since I have a teensy lying around I could use that and make my own controller.

    Both the trackball and the spinner use I2C, so I have the usual 4 cables with data, clock, VCC and ground. I should be able to connect both since the teensy 3.1 has 2 I2C interfaces, or I could connect them to the same I2C, although I am not sure which one is the address of the devices (I ripped them off a broken cabinet that was trashed).

    Once I get them wired; I can set up the teensy to be a mouse device, but how do I

    - Swap between devices (or have them both connected all the time, since I am using always one at time)?
    - which library do I use to do the I2C conversion to mouse ? Is there a sketch already made to use I2C trackballs or spinners with the Teensy?

    Thanks in advance!

  2. #2
    Senior Member
    Join Date
    Feb 2015
    You can share the same I2C bus as long as the devices have different addresses.

    Mouse example code here:

    If you don't have the datasheets for the I2C devices that you salvaged, project will be dead in the water.

Posting Permissions

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