
this is the prototype, il give it a fancier case sometime down the road when i figure out how to cut acrylic straight without a saw. my 3d printer doesnt have the build area (maybe if i play around with layout idk) and it always takes me forever to model things anyway. inside is a mass of wire that looks like it was laid out by a lunatic. buttons matrixed and leds charlieplexed. leds can be individually addressed and each can run their own brightness value (the greens are a little weak and need lower value current limiting resistors).
now i wrote a lot of code over the past week to get it all working. the first things i got out of the way was all the interrupt driven stuff, the led brightness control code and the rotory encoder code. both run in the background. the rotory encoder is kind of a configuration device, i can select one of the control modes, and can control settings in some modes. the computer sees it as a native usb hid keyboard.
the first control mode was pretty basic. the missile switch arms the big red button, which fires an alpha strike. pretty basic stuff. the other switch toggles between turbo and direct. turbo mashes the buttons for me when im feeling arthritic. the other mode just treats it like normal firing keys. the white button is actually set up as a toggle, this is useful for tag lasers, i can hit it and forget it (if you saw me running around with my tag on durring the last event, this is why).
technically this is a macro, just ignore that its written in c++ (though there are a few lines of asm in my interrupt service routines, for speed, but thats mostly to keep the leds blinking smoothly). mode 2 is where things start to get evil. this is my gunboat mode. the small buttons are really just arming toggles which correspond to each weapon group. when armed the big red button can fire them. the missile switch enables alpha mode, but when down the code cycles through the guns in sequence and fires them. if i flip the small toggle it enables uac mode, and double taps each button before going on to the next. the buttons throb in glee when this switch is set. inside the case ive epoxied a bar graph display from an old 80s stereo i dismantled. this displays a binary number indicating the firing rate. its a 10 bit number, and the lower half appear dimmer than the upper half, and they blink back and fourth. needless to say it is not easy to read without doing math in your head (maybe get one of those $2 i2c oled displays off of ebay, i didnt use my i2c lines).
mode 3 is a super evil way to bipass gauss charge, by making sure a gun is always ready to fire. the catch is it needs at least 3 of them to do it. its the least developed mode that is kind of buggy. you flip the toggle switch and it goes through the charge of each gun in sequence, of course it holds it slightly longer than the amount of time the gun will stay charged, so the guns dont fire. if i hit the red button, all armed gauss rifles will be unleashed in evil fury. this can be repeated until all guns are in cd. its great for those occasional pop shots, like when a light darts across your screen. its nice to be able to tap off a round or two on a moments notice.
the other 2 modes remain undefined, will probibly use those for kerbal space program.
i dropped in a match using the latter 2 modes, and each kind of made me feel guilty afterwards. i cant say i did exceptionally well. i always said macros were a crutch, but in my case its somewhat of an impedement. especially since i need to remove a hand from my throttle to hit the big red button of doom. im sure its only a matter of time before i come up with a way to pass the mouse commands to the device, and use them to trigger events, i can send serial commands up the cdc port and trigger an event on the device, but i need to figure out the pc side of harvesting mouse events. but still i dont want to get banned. so i probibly wont use it for anything but mode 1. in fact im seriously concerned i might get banned for such shenanigans. il just consider my hellbox another lesson in control systems (and blinkenlights).
Edited by LordNothing, 10 September 2016 - 12:39 AM.