My lovely wife got me a son for Christmas. 🙂
Little Maddox was born on December 24th, 2006 at 1:30 AM.
I can’t wait to buy him his first breadboard and soldering iron!
My lovely wife got me a son for Christmas. 🙂
Little Maddox was born on December 24th, 2006 at 1:30 AM.
I can’t wait to buy him his first breadboard and soldering iron!
Shell Calculator (Submit Answer)
This Linux Quiz once again calls for a shell script. Create a shell script that outputs the following when called with “–help” or “-h” as an argument:
Usage: mycalc OPERATOR FIRST SECONDWhere OPERATOR is one of add,subtract,multiply,divide
and
FIRST and SECOND are numeric
When the script is called with OPERATOR FIRST SECOND it should print the correct result. For example:
mycalc add 1 2
should print 3
mycalc divide 32 4
should print 8 and so on.
Extra Credit:
Design your script to accept parameterized arguments, such as –op=divide -f=1 -s=2, that can be entered in any order.
I don’t have pictures yet, but(see below!) the switch panel is wired and functioning with the exception of the magneto/start switch (which is yet to be built). This weekend I wrote a small program in Visual C# Express to interface the MJoy16 with Microsoft Flight Simulator X using SimConnect. Most of my programming has been in C or various scripting languages such as PHP, Perl and Bash so I needed a helping hand to get started in Visual C#. NotASenator from the Avsim forums has a nice SimConnect tutorial series started and I followed that with no problems. I added some joystick button code and FSX events to the basic framework NotASenator created and was up and running this weekend.
The only problem I have now is some strange behavior with the TOGGLE_MASTER_ALTERNATOR event. The toggle behavior doesn’t seem to match other events. Right now the alternator switch only works correctly if the battery switch (TOGGLE_MASTER_BATTERY) is toggled.When I get that investigated further I’ll post an update.
Call me a freak, but flipping a switch on a control panel and having the flight simulator react is very, very cool. Especially after all the soldering that was required. 🙂
My prototype main form code, very rough in zip format.
All you real programmers out there, don’t panic when you see it…
Note that this prototype code is hard-coded to my particular joystick setup and is provided as an example only.
Pictures
Humble Beginnings | Prototyping at its best |
---|---|
Diodes Everywhere |
The 3 black things on the blue thingy glued to the 2×4 are 50K slide pots. Some day they will be linked to proper throttle, pitch and mixture controls. 😉 This is all just proof of concept at the moment, I’ll get around to building something a little more permanent later.
This is my first effort at building a cockpit panel for use with flight simulators. It is a basic bottom panel, modeled loosely after a Cessna 172.
The panel | Closeup of small switch |
The only switch left to add is the magneto/starter switch in the blank space on the left side. I will probably build my own, based on this product. Check out the brochure link at the bottom of the page for construction details.
I was pleasantly surprised to find a split toggle switch at my local electronics surplus store to use as a battery/alternator switch.
Here is the USB interface portion of the excellent (and free) MJoy16 controller I am building on some .100″ perfboard.
IT WORKS!!!!!!
Thank you Mindaugas Milasauskas!