And so we arrive at the end of yet another day of tinkering. Working on the electronic bits here and there. I managed to connect and test all the analog axes. They work great but my change to turn the Z-axis into a proper ‘Throttle’ HID report resulted in Elite Dangerous no longer recognising the axis. So that was a total waste of time. Nevertheless I also worked on some lighting effects and they look pretty ok. Not as bright as I would’ve liked but legible nonetheless.
So the status now is a working throttle block with a few lights, and a partially working X/Y stage with just the trigger, no light, and a buckload of wires sticking out with a possible chance of shorting something out. That will be my first priority.
All the hardware works. All communication between throttle and yoke works, the lights work, the data gets through. It is now a question of expanding on the same concept (connect a light, connect a button).
Firmware is also coming along nicely. With this amount of leds and wires it is becoming impossible to keep the firmware generic, especially with all the animation stages going on. I did keep the source nice and clean though by using a few object classes here and there so people checking out the code later on should be able to understand it. One example is a Calibration class which takes care of doing all the math work to take the potmeter value and turn it into an self-calibrating value between -32000 and 32000 (which is what the joystick reports to the computer). So what does the calibration do? Well basically after plugging in the device is filters out the noise, calculates the minimum and maximum values and transforms that into a proper scale with a few end-stop deadzones. The deadzones will make sure that the maximum or minimum value can be reached in top or bottom 5% of the stick. The reason for this work is to avoid having to implement a custom calibration tool.
Tomorrow I hope to move from the breadboard to a solderboard so I can get rid of all the jumper cables and have some solid reliable connections. All these wires is making the readings a bit noisy.