merteer
Registered:1410484001 Posts: 8
Posted 1414220039
Reply with quote
#1
Hi all, New to messing around with hardware, so this may or may not be a dumb question: I'm beginning to plot out a custom weapons console and I'm wondering if I can use a five-position selector switch for beam frequency. I know currently the controls.ini file is not set up to map to specific beam frequencies; what I'm wondering is whether it's possible to have the selector switch motion read as "increase" or "decrease" instead of the position --- so that as long as the switch is in the correct position when the game is started, it will ultimately have the same result. Did that make sense? Would this work?
stugo
Registered:1398974852 Posts: 26
Posted 1414237050
· Edited
Reply with quote
#2
Awesome plan! Why didn't I think of this when I built my controller? You could probably do it with a bit of coding. What output does the encoder provide? Let's play with the thought that you get some numbers from it. I believe the game always starts on freq A so we'll set the encoder to A before start-up. Then the code will look for an increase or a decrease from the encoder. If the new value is higher then the last it will output a keyboard "Arrow Right" and if it's a lower value then it will output a keyboard "Arrow Left". However if the encoder gives you some other output then a different approach is needed. I'm thinking something comparative, like if it was on X and now is on Z then it's an increase. It's a bit more coding but not too much. What kind of hardware are you using in your build? Looking forward to see your build.
Badgeguy
Registered:1375080733 Posts: 316
Posted 1414255361
Reply with quote
#3
But you don't even need to worry about those conditions. At the start of the game run the dial to both extremes once and it will be reset to where it needs to be, assuming that the 5 position selector has stops on either end (e.g. it can not be spun around in a circle one direction forever). If you send an increase command to the beams frequency when it is already at "E", it wills stay at "E".
merteer
Registered:1410484001 Posts: 8
Posted 1414270077
Reply with quote
#4
Great! @stugo, the newness of this plan can not be understated... right now I'm just sketching out what I want to happen, and figuring out what is possible... and I was curious as to whether a selector switch would be read as a change in input, or as a static input. I guess either way with a little coding it could be done... The NEXT step is to solidify the "what" and "how." This is a learning project for me, but once I get off the ground I'll be more than happy to share my progress (and setbacks)! Thanks for the replies.
stugo
Registered:1398974852 Posts: 26
Posted 1414346430
· Edited
Reply with quote
#5
@Badgeguy, correct you are. Forgot about that. @merteer, Sweet, the best stage try to make a mock-up. I used SolidWorks, but SketchUp or even cardboard works great. If you want to control lights as well as all the buttons and encoders, then Arduino is the name of the game. If you only want buttons and some encoders then Leo Bodnar makes great hardware that shows up as a joystick. When I first started building consoles I could solder but that was it. I had to learn programming and a whole lot more. Fun times!
merteer
Registered:1410484001 Posts: 8
Posted 1414468550
Reply with quote
#6
I'll probably just go ahead and create a new thread to show my progress (once I have any) since the title of this one will be a bit out of date. As a follow-up, though -- I'm planning on using Arduino. It seems the simplest thing to do is have the Arduino emulate a USB keyboard and output key presses... but is that idea not compatible with also receiving information from the game (for lighting)? I'm glad to do the legwork, but I could use a first-step pointer as I've only got my brain wrapped around keyboard emulation, and not other options...