• circuit python, usb hid descriptors can suck a dick, Freecad is fantastic.

    Ticktok03/20/2021 at 02:37 0 comments

    Switched microcontroller the the Feather Bluefruit Sense. It's got a built in gyro, bluetooth, lipo charging, and works with circuit python.  I'm still not 100% sold on circuit python, but the ability to modify the code without an ide or anything required to flash it is pretty friendly, and one of my main goals with this project is to keep it open to the community.

    I've got the circuit python library for the cirque touchpads working, and redesigned the ciruit python usb hid gamepad descriptor to have more values. So now it can support 16 buttons, a hat switch, and 6 axis(left stick x/y, right stick x/y, left trigger, right trigger.)

    I modeled a rudimentary controller frame in FreeCAD to affix the pads, the breadboards, and start attaching buttons and such to.

    Some of the discussion on r/SteamController about a SC2 some people have suggested 6 facebuttons like sega genesis, which sounded pretty great to me, so I'm going to add that.  Another suggestion was pressures sensative pads instead of click. So I'm going to test putting Force Sensitive Resistors(FSRs) behind the pads and see how that feels.

    I just received my hall effect sensors that I'm going to use for the triggers. Need to model and print a trigger mechanism and test it out. I hadn't realized until recently that the Steam Controller already uses hall effect triggers.

    I think I've got it figured out how I'm going to wire the buttons.  It's 18 buttons total

    • 4 back buttons
    • 2 shoulder buttons
    • 2 trigger second stage buttons
    • 6 face buttons
    • 1 thumbstick button
    • 3 home/start/select

    The cirque touchpads can actually take in 3 buttons and report them over their spi/i2c packet, but 1 of those buttons shares a spot with the in built "tap" software button, so I'm just going to attach the L/R shoulder/trigger buttons to the touchpad inputs, then matrix the other 16 buttons to reduce input pins. We'll see how well this works with circuit python or if there will be too much input latency.

    I'm still considering swapping to the arduino nano rp2040 connect. It'll still run circuit python, and has built in bluetooth and imu, but has much more gpio, and the gpio is ran through the PIO cores, which might be able to drive the matrix fast enough.

    Still need to test swapping between sending gamepad/keyboard/mouse inputs or sending all at once. Once I get all the inputs wired up and mounted to the 3d printed frame I think this'll go faster.

    Doing some tutorials to practice surface modeling in FreeCAD so I can get a more rounded/organic design like the steam controller's housing.

    I've also been brainstorming my vision for customizing input. First stage will just be a simple text file on the flash memory that can be edited from the pc it's plugged in. Next stage will be editing/selecting the configs on the fly using the controller's oled display. Next stage will be a pc app that can map those configs(and one day swap configs depending on what app is focus/running. Stretch goals is maybe a phone app.

  • Initial commit of starter code.

    Ticktok03/08/2021 at 17:13 0 comments

    I got the esp32 working with Cirque's demo code, then once I figured out what needed to happen to get that working, I moved it over to 2bndy5's cirque trackpoint library and updated that to work with the esp32.  Now that I can reliably control the touchpads, and have already made good progress on functions to interpret the data I need to chose the next step forward.

    I was going to work on getting the esp32 ble composit hid device stuff working, but after realizing that the esp32 doesn't have any usb hid capability, I think I might put that on hold, and switch to the teensy 3.2 until my tiny2040, pico, or feather nrf52 boards come in.

    I still think I intend to do this all on the arduino nano rp2040, since it has built in ble and imu. Just waiting for it to release. And then I'm going to have to adapt the code over to that.

    Another option is circuit python. The rp2040 works with circuit python, and while I'm a bit loath to use python in an embedded device, it would make it extremely open/user friendly to new users, and I've already verified 2ndy5's cirque ciruity python library works pretty solid on the itsybitys m4.  So, I may instead switch over to that. Although, the reason I stopped using the itsybitsy was I discovered all the gamepad libraries didn't have analog triggers or enough button selection options. If I go this route I need to really dig in to the usb/ble hid libraries.

    Another concern I have with circuit python is button press latency. of all the gamepads out, the steam controller had some of the worst latency compared to playstation/xbox gamepads. python isn't known for being "high speed embedded", so that may nix this idea as well.

    Anyway, here's the initial commit of the git. https://github.com/ryanayoung/projectSpigot

    forgot to include this in previous log. I've got some posts on my twitter of it working.

    Running as a ble mouse on the esp32:


    Acting as a "potentiometer" to control a neopixel ring.