simple control panel

dnt462

Donator
Donator
Joined
Aug 25, 2009
Messages
80
Reaction score
0
Points
0
I would like to build a control panel for when i fly for things like the cargo bays, radiators, and landing gear because i don't do lots of flying in the 2d cockpits, and i don't like having to go find the switch i need, mainly because I'm lazy, but i cant figure out if its possible to simulate a mouse click if I'm not locking at that panel, well even if i was on the right panel i don't know how, so my question is, is it possible?
 

Robb Bates

New member
Joined
Aug 2, 2009
Messages
102
Reaction score
1
Points
0
Yes, it's possible. Check out AutoHotKey. That will emulate mouse clicks. You should be able to use it detect joystick button presses and then map that to a mouse click on the 2D panel. But you'd have to have it on screen.

The only other option is to tie into the API somehow. Check out Orb:Connect.

Robb
 

Hielor

Defender of Truth
Donator
Beta Tester
Joined
May 30, 2008
Messages
5,580
Reaction score
2
Points
0
If the vessel in question has key commands for the things you're trying to do, then yes it's possible.

Otherwise, no, it isn't possible to activate a switch that's not visible on screen.
 

Robb Bates

New member
Joined
Aug 2, 2009
Messages
102
Reaction score
1
Points
0
Well, if that function is accessible via the vessel's API, then you should be able to activate it via some custom software, right?

Robb
 

dnt462

Donator
Donator
Joined
Aug 25, 2009
Messages
80
Reaction score
0
Points
0
so if theres a key command for it like the standard autopilots it should work.
I'm a fan of the XRs and the standard dg if it makes much of a difference.
 

Robb Bates

New member
Joined
Aug 2, 2009
Messages
102
Reaction score
1
Points
0
If there's a key for it, that makes it really easy. If there is an API access for it, but not a key, it's possible, but harder.

The XR series have a lot of key commands, so that's a big help.

Robb
 

dnt462

Donator
Donator
Joined
Aug 25, 2009
Messages
80
Reaction score
0
Points
0
yes i started to look at the key commands, the xrs have the commands i want, next step, how to set it up with little cash? I will go look at the page in the wiki latter.
 

Robb Bates

New member
Joined
Aug 2, 2009
Messages
102
Reaction score
1
Points
0
Probably the cheapest way for you is tear apart a cheap (i.e. thrift store) joystick and wire up the buttons to your panel switches.

If you have the skills, try building an MJoy16. I'm doing that right now and it's working quite well.

Robb
 

dnt462

Donator
Donator
Joined
Aug 25, 2009
Messages
80
Reaction score
0
Points
0
I'm thinking i want at least the XR payload bay, radiator, nosecone/docking port, retro,scram, and hover doors. Maybe the standard auto pilots also.
 

TSPenguin

The Seeker
Joined
Jan 27, 2008
Messages
4,075
Reaction score
4
Points
63
Might I suggest using a cheap gamepad instead of a joystick? More buttons per dollar :)
If you have it as a gamecontroler in direct play (wich should be the default for this setup) it is really easy to write an autohotkey script for it.

Happy Orbiting
 

dnt462

Donator
Donator
Joined
Aug 25, 2009
Messages
80
Reaction score
0
Points
0
ok, lets say i make an MJoy16, how would i set it up so orbiter know i sent in a command , for example the payload door on my xr5 (control-u)
 

Robb Bates

New member
Joined
Aug 2, 2009
Messages
102
Reaction score
1
Points
0
Take a look at AutoHotKey, Joy2Key and MJoy Mapper.

The first two only recognize the first 32 buttons.

Robb
 

dnt462

Donator
Donator
Joined
Aug 25, 2009
Messages
80
Reaction score
0
Points
0
Ok I think i want to use an MJoy16, but what do you think is the best diagram of the board, And i would still be able to use my normal joystick right.

Wait, am i going to have to order the ic. why do i always go to start things on Fridays, and around holidays.

yet another edit, i have been seeing the MJoy16-c1, which someone said used the ATMega16-16pi instead of the ATMeag8-16 that the regular one uses, so I'm wondering if its worth paying twice the price, and if the wiring will be the same so i could user the MJoy16-c1 user manual i found.
 
Last edited:

Robb Bates

New member
Joined
Aug 2, 2009
Messages
102
Reaction score
1
Points
0
Ok I think i want to use an MJoy16, but what do you think is the best diagram of the board,
Most definitely NOT the one included in the MJoy16 documentation. Being a professional PCB designer, I cringe when I look at that layout. Because it's such a simple design, the easiest route is to build it on a protoboard. That's what I did and it's working great.

And i would still be able to use my normal joystick right.
Yes.

Wait, am i going to have to order the ic. why do i always go to start things on Fridays, and around holidays.
And program it too.

yet another edit, i have been seeing the MJoy16-c1, which someone said used the ATMega16-16pi instead of the ATMeag8-16 that the regular one uses, so I'm wondering if its worth paying twice the price, and if the wiring will be the same so i could user the MJoy16-c1 user manual i found.
The ATMega8 and the ATMega16 are different chips. You can build an MJoy with an ATMega8 or an MJoy16 with an ATMega16. I suggest the MJoy16 since it has so much more to it and the difference in price is minimal. The "-16pi" means 16MHz rated, Plastic DIP package, Industrial temperature range. As long as it's rated for 12MHz or higher, it doesn't matter what package or temp range you use, as long as you can work with it. The "-16pi" is usually the cheapest.

While you're ordering stuff, get a 12MHz ceramic resonator with a center ground pin instead of the crystal with caps. It's easier to work with. And DON'T get 1N4733 zener diodes, get 1N4728. The docs spec the wrong zener part number. The 1N4733 is +5.1V and the 1N4728 is +3.3V which is what the USB data lines need to be held to.

Good luck!

Robb

(Might need +3.6V zener instead. See http://www.orbiter-forum.com/showthread.php?t=16726 )
 
Last edited:

dnt462

Donator
Donator
Joined
Aug 25, 2009
Messages
80
Reaction score
0
Points
0
I think I'm going to order a custom pcb, it was my dads idea, and i think he also wanted to uses an ATMega16-16au.
 

Robb Bates

New member
Joined
Aug 2, 2009
Messages
102
Reaction score
1
Points
0
Well, if you can layout and solder a TQFP, then go for it. DIPs are just so much easier to work with at home with limited resources. No good reason to go that small. It's just a hassle. This is the voice of experience.

Robb
 

yagni01

Addon Developer
Addon Developer
Donator
Joined
Feb 8, 2008
Messages
463
Reaction score
0
Points
16
Location
Atlanta, GA
Well, if you can layout and solder a TQFP, then go for it. DIPs are just so much easier to work with at home with limited resources. No good reason to go that small. It's just a hassle. This is the voice of experience.

Robb
Concur. I didn't know I knew such language.
 

Robb Bates

New member
Joined
Aug 2, 2009
Messages
102
Reaction score
1
Points
0
The circuit lends itself rather nicely to protoboards.

One neat trick I used was to use a 20 pin IDC connector. Pins 1-8 were Columns 1-8, Pins 9-20 were Rows A-L. Then you run that 20 conductor ribbon cable behind all your panels. Where ever you need to connect switches, you use a 10 pin IDC connector to tap into the 20 conductor ribbon cable. Based upon how many switches you have and how they are mapped to the MJoy16, you then separate the ribbon cable into the appropriate conductors and tap your 10 pin IDC onto it. For example, my Left and Right MFD panels use 15 buttons each. Mapped as 8 columns by 2 rows, I separate the conductors for Columns 1-8 and Rows C & D for the Left MFD and Columns 1-8 and Rows E & F for the Right MFD. The diodes and matrixed wiring are done on the back of the MFD panel. Coming from the panel is just a bundle of wires with a 10 pin header on the end. This will allow you to remap the buttons without too much pain and also allows you to disconnect the panel for modifications.

Hope that makes sense.

Robb
 

dnt462

Donator
Donator
Joined
Aug 25, 2009
Messages
80
Reaction score
0
Points
0
The TQFP is not a problem, it was my dads idea to use it, and i can get 3 custom pcbs for like 60 bucks including shipping, the board is only 3.8 in by 2 in so, and we have 2 different schematics, and a board to go with its, the picture is the schematic my dads did, and he already designed his board, i tried the same, though its not as nice looking, and my dad works with this kind of stuff all the time.

MJOY16.jpg
 
Top