[Bjonnh.net]# _

I finally put my hands on a Trinket M0 for the Trackpoint. Meaning, no more ugly driver.

For now it is still on a protoboard with its level converter.

Trinket with levelconverter

And this is how it is connected:

Schematic of the trinket and level converter

There is definitively a difference in feeling compared to the system using uinput and the serial connection. That’s pretty surprising to feel what should be a pretty small difference in latency.

The code is simplified as well, here is the relevant section for the movements:

TrackPoint::DataReport d = trackpoint.readData();
  if ((d.x!=0) ||  (d.y!=0)) {
  if ((d.state&4)!=0) {  // I inverted 3 and 1…
    if (!Mouse.isPressed(MOUSE_LEFT)) {
  } else { Mouse.release(MOUSE_LEFT); }
  if ((d.state&2)!=0) {
    if (!Mouse.isPressed(MOUSE_RIGHT)) {
  } else { Mouse.release(MOUSE_RIGHT); }

These are the things left to do:

  • Finish the polishing/gluing
  • Try to make that stream mode work (clock signals are ok), I’ll need to bring my oscilloscope.
  • Add a third button: for now we have two-button emulation, but that also mean I don’t have a nice scroll, and too bad I removed that scroll wheel ;)
  • Find an old USB hub and integrate everything inside the keyboard.