PDA

View Full Version : Arduino mega 2560, mastercard OC, SIOC and tons of basic, essential questions



Jahanzeb
11-02-2013, 05:21 PM
Hi,

After building my first overhead panel with complex methods involving joystick and keyboard hacks, capacitors and relays, like all builders, my "hunger for more" is famished. I want physical moving guages. backlit panels. Pots. Rotary encoders. Displays showing numerical values.

After reading and researching, ive noticed people use mastercards (OC) along with servo cards and motor cards by OC. i dont want to jump into servos and motors immediately. i want to start with toggle switches. then, backlit panels, then rotary encoders and display for the MCP.

My questions are:
1. can i start with the arduino mega 2560? without a mastercard?
2. what is the difference between R1, R2 and R3 for the 2560?
3. i studied C++ 10 years ago in high school. im rusty. will i be need a lot of programming background to writes codes (SIOC)? are generic codes available online?
4. does the arduino card support 54 buttons? can i interface it with FSUIPC? what Pot value does it use? can i use encoders with it? can i use pots as encoders?
5. i've read that the arduino has display out. For the MCP, can i use it for numeric values, say, for setting altitude?
6. can i control small LED's with an arduino?
7. what does the OC mastercard do? why is it so important?
8. what is the difference between serial and USb Arduino Mega2560?
9. I visited my flight school to grab an old VSI and Altimeter, but they cant let me have it by law in my country. so is there a way to make your own? (maybe with a small bedside clock or something) i know OC has these in stock. but im looking for other options.
10. i want a B737-800 cockpit. at the moment im using PMDG. i've seen cockpit builders use Prosim 737 and project magenta. when i visited their sites, it seemed as if they offer guages and not the actual airplane. so the guages are used in the physical cockpit that you build, interfaced through FSUIPC to FSX to use FSX scenery right? you cant see a virtual, or a 2D cockpit in FSX if you use prosim and PM right?


i'm just starting out. so a lot of the questions might seem stupid to you guys. but thats how you learn.
Any help would really be appreciated.

Jahanzeb
11-08-2013, 07:22 AM
anyone? answer to any one question would be appreciated.

Sammy-E
11-08-2013, 10:09 AM
anyone? answer to any one question would be appreciated.

For the Arduino side check out this Forum thread. Might have more luck getting some answers.
I use Arduino, but I am 'out of it' due to time reasons. will get up to speed again this winter. But I do know many answers will be 'yes'

http://www.mycockpit.org/forums/arduino-cards-link2fs/

Eric

tiburon
11-09-2013, 02:27 AM
Prosim and project Magenta simulate the aircraft logic. I don't know about Project Magenta but Prosim has an aircraft model (very basic, but that's not important when you only use FSX for the outside view) that you can use with their software. You can use their gauges on a monitor or you can interface your hardware which is, of course, your ultimate goal.

tiburon
11-09-2013, 02:33 AM
To interface your switches I advise you to take a look at these : cheap, reliable and very easy to use (no scripts)

http://www.leobodnar.com/shop/index.php?main_page=index&cPath=86

Jahanzeb
11-10-2013, 04:25 AM
For the Arduino side check out this Forum thread. Might have more luck getting some answers.
I use Arduino, but I am 'out of it' due to time reasons. will get up to speed again this winter. But I do know many answers will be 'yes'

http://www.mycockpit.org/forums/arduino-cards-link2fs/

Eric

much appreciated. Thanks


Prosim and project Magenta simulate the aircraft logic. I don't know about Project Magenta but Prosim has an aircraft model (very basic, but that's not important when you only use FSX for the outside view) that you can use with their software. You can use their gauges on a monitor or you can interface your hardware which is, of course, your ultimate goal.




Ok so, can't I do the same thing with the PMDG model? You can switch to 2d cockpit and close the cockpit window to get just the scenery, while get the gauges on a separate screen by undocking them.

tiburon
11-10-2013, 05:04 AM
You would have to learn how to use the PMDG SDK's and even then I doubt if you can get the full functionality of the cockpit.
No gauges, only the displays. I don't think it's possible to extract the code from PMDG to interface your hardware steam gauges.

Avro748
11-10-2013, 03:39 PM
Just remember that you don't even need physical gauges. PMDG's 2d panel gauges are very high-res, and can be undocked and placed behind a panel. A lot of cockpit projects do this. That's what I'll be doing as soon as my financial issues clear up.

tiburon
11-10-2013, 04:00 PM
well, that's the risk of asking questions in a forum. A lot of contradicting information.You can only undock the glass displays, not gauges

Avro748
11-10-2013, 04:46 PM
But you could turn the analogue gauges into their own windows in FSPS.

Avro748
11-10-2013, 05:11 PM
But you could turn the analogue gauges into their own windows in FSPS.

Jahanzeb
11-12-2013, 09:00 AM
But you could turn the analogue gauges into their own windows in FSPS.

what's FSPS? i can only undock glass displays as tiburon stated.


You would have to learn how to use the PMDG SDK's and even then I doubt if you can get the full functionality of the cockpit.
No gauges, only the displays. I don't think it's possible to extract the code from PMDG to interface your hardware steam gauges.

thanks for making that clear. i think i understand that now. basically, with PMDG, i cant make physical guages or instruments. whereas, prosim is purpose built for cockpit builders. so im guessing project magenta does the same thing as prosim? if so, which is better?

tiburon
11-12-2013, 09:32 AM
Yes, Poject Magenta does the same thing. I have Prosim myself and it's awesome. Not only all the systems of your aircraft but also an instructor station where you can configure all situations and failures of your flight.Don't know about Project Magenta, it's been around much longer but always was way too expensive. Of course, Prosim nowadays is also very expensive but totally worth it.

Avro748
11-12-2013, 04:28 PM
FSPS = FS Panel Studio. It's an alternative to notepad for editing Panel.cfgs. It allows you to do many things, one of them being to create windows and place gauges in them. Unless you like Notepad's trial and error philosophy, FSPS is worth the money.

Jahanzeb
11-16-2013, 01:09 PM
Yes, Poject Magenta does the same thing. I have Prosim myself and it's awesome. Not only all the systems of your aircraft but also an instructor station where you can configure all situations and failures of your flight.Don't know about Project Magenta, it's been around much longer but always was way too expensive. Of course, Prosim nowadays is also very expensive but totally worth it.

thanks a lot for the info. being a noob i had no idea what the main difference was between prosim and pmdg. i thought all the home cockpit builders were using PMDG. now i see why you cant.
so you have first hand experience of prosim. it sounds pretty cool. they way you put it, makes it sound really enticing. im going to be looking into it. how far along are you in building your cockpit?



FSPS = FS Panel Studio. It's an alternative to notepad for editing Panel.cfgs. It allows you to do many things, one of them being to create windows and place gauges in them. Unless you like Notepad's trial and error philosophy, FSPS is worth the money.

so can you undock any instrument panel after using this software to edit panel.cfg?
secondly, i friend built a pretty decent computer. GTX 660Ti, 16Gb ram and what not. he connected 4 LED displays. 1080P. the frame rate is unbelievably horrible. so my question is, when you undock so many panels, and use multiple displays, wont that severely affect your FPS?

Avro748
11-16-2013, 02:36 PM
It can, but as long as your computer is powerful enough, and you use the venetubo fix, it won't be noticeable. Also, PMDG's 2d panel gauges are very high res, and should look almost real. I am not incredibly far into my cockpit, all I have is half of my overhead panel, and I don't even have most of the outputs done. All but two of the inputs are done on that panel. Almost all of the cockpit is planned in autocad and sketchup though, so once I can get back to the project, it should move pretty quickly.

tradari
01-26-2014, 11:01 PM
this might be an old thread but I felt a few bits of information are missing.

1. Leo bodnar boards are ok for inputs but don't expect them to work so well with encoders I have had no end of trouble and there support is zero. I have send many emails to Leo and had zero replys.
2. Arduino cards can work with FSX take a look http://www.jimspage.co.nz/Link2fs_Multi.htm for info his sim uses all Arduino kit.
3. prosim737 looks good but its £650 euros so bear that in mind too however I is good ad does simplify connections

pilotstu
02-18-2014, 05:00 PM
You probably have most of your answers but just to let you know, I am hopefully going to complete a 737NG cockpit using Aruduino. I have three set up so far. One each for the CDU, FWD Overhead and the MIP. Using FSUIPC, I assigned switches to keystrokes to mouse macros, then assigned the same keystroke in Jimz program with the Arduino. sounds like a long way round but it worked for me. I managed to use 58 inputs on one card. Arduino, as far as I can see
I have my Brother-in-law working om the PMDG extractions for the LEDs and he has almost got it!
Am I right in assuming PROSIM737 is 600Euro? That ain't cheap!

tradari
02-19-2014, 12:33 AM
yer would love to get it all working with pmdg but the background work is hard going. i have currently a leo bodnar board running the switches on the cdu via a program called LINDA V1.13 and I'm about to start work on the encoders via the arduino card and jims multifs program. i like the prosim 737 and have seen it running on a friends sim but the price is a little high at the mo. (if i can get the encoders to work and then the pmdg might just be possible to do with everything home built which is what im looking for.

BTW i have an empty garage to build my sim in so this is in prep for that. Making sure systems work and build a plan before starting any major construction :)

pilotstu
02-20-2014, 04:07 PM
LINDA is great! It's a pitty I can't use LINDA with the Arduino Mega. Would save lots of work!

Isaid in my first post I used 58 inputs on the Arduino. It's actually 68. One short of a full CDU unfortunately.

I too am building a room in my garage. The wood and plasterboard arrived yesterday. Now to try and build a few walls!!!
Good luck

tradari
02-21-2014, 04:51 AM
Sat just gone a friend build a wall in front of my garage door so the build has now started lol

Jim NZ
02-21-2014, 03:37 PM
Sorry to jump in on this thread,, but I have a quick question and you Guys seem to know what your talking about.

In my "Link2fs Multi" program (for the Arduino) I have been playing around with adding a couple of pages where the user can just "drop in" any FSUIPC extraction offset and that extraction is then sent to the Arduino after it is processed into a usable format ,,, meaning we can access all the FSUIPC extraction offsets as well as the Simconnect stuff.
So far it working very well with extractions.

My question ,,,, is to do with "inputs"

My program can input simconnect codes as well as keyboard codes thru the "Keys" section so I thought I had the input side of things covered.
Is any reason I should be adding a section for FSUIPC inputs ????

Good luck with the garage mods :)

Thanks Guys ,,, Jim

pilotstu
02-21-2014, 04:36 PM
Hi Jim,
Firstly, I need to thank you for your great work. Without it, I would have been stumped... or have to buy expensive Plug and play modules. So again cheers. I assume when you mention "dropping in" the FSUIPC offsets this would be used for the LEDs in the annunciators for example? I have not been on your site for a while!!!
I have had a major problem trying to find and extract these offsets/extractions but my knowledge is rather limited. My brother-in law is helping with that side of thing as I really don't understand it!
With regards to your question. I'm not 100% sure what benefit that would bring however I don't know the half of what FSUIPC can provide. As I said earlier, I just assigned a mouse macro in FSUIPC, to a key. This key was assigned earlier in your "Link2fs" program. For example; I wired the taxi light switch to pin 20. Assigned it to F1. In FSUIPC mouse macro, clicked taxi light and assigned it F1.
Is this the way it should be done or is there an easier way?
I hope I have not rambled on too much!

Tradari, Lucky you!! I still have a pile of wood and plaster sitting in my garage...... Build on hold! Lol

tradari
02-21-2014, 07:59 PM
FSUIPC hooks are always handy and i find that some aircraft seem to work better with sim connect and some better with FSUIPC so having the option would be handy Jim but i fear only for select planes.

Jim NZ
02-22-2014, 12:10 AM
Yes ,, thanks Guys ,,, I was just covering some ground as to if there was a need or not.

Some "Hi end" add-on planes carry some of their own "systems" with them and the normal simconnect extraction wont work for a few things (depends on the plane) but Pete (FSUIPC) has included most of them into his FSUIPC program which is marvelous.

Stu ,, re the lights ,,, my program can do all the lights (all separately) with direct inputs with ease. ,,, that is assuming it's not one of those planes mentioned above with it's own "system" for the lights ,, but if what you have done works ,,, then that's all that matters.

The only thing I was worried about was inputs but I suppose my "Keys" section would cover that for those "odd" inputs that some-one may need.

OK Guys ,, Thanks for that ,, I'll leave you in peace ,,, Jim

tradari
02-22-2014, 02:01 PM
Jim always happy to see your posts :) - have you seen the program LINDA which using hooks to fsuipc to control the PMDG would be nice to see one program that links the arduino into everything :)

Jim NZ
02-22-2014, 07:44 PM
Thanks Tradari. I had a look at Linda last night and done a quick study.
It certainly looks a great program and well thought out ,, more reading ahead for me. :)

I also downloaded the latest FSUIPC SDK to get an update on all it's bits and pieces so between the two, there is going to be another "read and take it all in" period for me. :)

At the end of the day I just want to have the option for some-one to be able to extract (say) the autopilot altitude from within a "Hi end" add-on that does not use simconnect for that purpose.

I suppose even just having a section where the user can type in his own request is still going to be handy for some Guys for need that odd thing that is not one of my standard extractions.

OK ,, back to the drawing board. :) :)

Cheers ,,, Jim

fsx-cockpit
02-23-2014, 03:10 AM
Jim, do you use sometimes X-Plane?
Is there a possibility sometimes to see a " Link2xplane_multi " ?

I spend much time with FSX. My wife ask me if there is a programm " Link2wife_multi "....I am real happy about the Autopilot :roll: :lol:

To all wifes and girlfriends in the FSX world, thank you for passion with us :)

Cheers, Chris

learjetmike
04-02-2014, 06:46 PM
Hi Guys, Im a very new simbuilder and just bought an arduino mega and this message is more directed at Jim, im from hanger 45.net where most of the guys there use other boards for interfacing but in the UK Ican pick up the mega for £13! so its an obvious choice.
Like I say I am an absolute novice with the arduino and just asking the question other than the link2fs software what things would i need to get my mega acting for me like the learjet.

Just buying leds, encoders, switches and wiring.......

Thanks

Mike

learjetmike
04-02-2014, 07:05 PM
hi jim also just got this error while trying to run the exe file on a windows 8.1 system 64 bit

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.


************** Exception Text **************
System.IO.FileLoadException: Could not load file or assembly 'Microsoft.FlightSimulator.SimConnect, Version=10.0.60905.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more details. (Exception from HRESULT: 0x800736B1)
File name: 'Microsoft.FlightSimulator.SimConnect, Version=10.0.60905.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' ---> System.Runtime.InteropServices.COMException (0x800736B1): The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more details. (Exception from HRESULT: 0x800736B1)
at Link2fsMulti.Link2fsMulti.DefWndProc(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)








************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.8000 (FX35W81RTMGDR.050727-8000)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Link2fsMulti
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/Michael/Downloads/link2fs_multi_fsx_v5h/link2fs_multi_fsx_v5h.exe
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.7905 (win9rel.050727-7900)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.7905 (win9rel.050727-7900)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.7905 (win9rel.050727-7900)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.7905 (win9rel.050727-7900)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.7905 (win9rel.050727-7900)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
AxInterop.WMPLib
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/Michael/Downloads/link2fs_multi_fsx_v5h/AxInterop.WMPLib.DLL
----------------------------------------
Interop.WMPLib
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/Michael/Downloads/link2fs_multi_fsx_v5h/Interop.WMPLib.DLL
----------------------------------------


************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.


For example:


<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>


When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

tiburon
04-03-2014, 12:23 AM
Hi Guys, Im a very new simbuilder and just bought an arduino mega and this message is more directed at Jim, im from hanger 45.net where most of the guys there use other boards for interfacing but in the UK Ican pick up the mega for £13! so its an obvious choice.
Like I say I am an absolute novice with the arduino and just asking the question other than the link2fs software what things would i need to get my mega acting for me like the learjet.

Just buying leds, encoders, switches and wiring.......

Thanks

Mike

You do know you can flash the Arduino so it becomes a joystick controller with 52 inputs ? Very easy to do and just assign your switches through FSUIPC afterwards. Of course you lose the output functions...

Martin

learjetmike
04-03-2014, 05:13 AM
Hi Martin,
I sorta had an idea that it could but no idea where to start with that, any help will be much appreciated.

you can mail me direct at mjeyre@hotmail.com.

Thanks

Mike


You do know you can flash the Arduino so it becomes a joystick controller with 52 inputs ? Very easy to do and just assign your switches through FSUIPC afterwards. Of course you lose the output functions...

Martin

tiburon
04-03-2014, 07:15 AM
Mike, take a look here, it tells you exactly what to do : http://arduino.cc/en/Hacking/DFUProgramming8U2

tiburon
04-03-2014, 07:19 AM
Ah, I found a tutorial on my pc, I'll send it to you.

lderoo
11-09-2014, 05:48 PM
Did anyone have a solution to the problem of getting Link2FS to work with Prepar3D? I am having the same issue as LearJetMike when I try to run the .exe file. I am running Windows 7 - 64bit.

I am trying to get Link2fs_multi_FSX_v6f to run on my PC. The following message comes up when the executable tries to load.


System.IO.FileLoadException: Could not load file or assembly 'Microsoft.FlightSimulator.SimConnect, Version=10.0.60905.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more details. (Exception from HRESULT: 0x800736B1)
File name: 'Microsoft.FlightSimulator.SimConnect, Version=10.0.60905.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' ---> System.Runtime.InteropServices.COMException (0x800736B1)

I previously had Link2FS working on my PC when I had FSX installed. Now that I only have P3D, Link2FS does not run. Does it look for FSX in the registry?

tradari
11-29-2014, 02:36 PM
hi Lderoo, i have just completed a full reload on my computer and thought i might give Prepar3d a fair go instead of FSX i get the same error as you for info. however i managed to fix the issue by loading the older version of simconnect from the p3d folder

check under /lockheed martin/prepar3d v2/redist/interface/and install the simconnect.msi from the fsx-rtm folder and the fsx-sp1 folder

hootsmangreen
12-05-2014, 01:06 PM
If you can afford the £600 for prosim then this is the way to go bar none. I helped my mate build his pit and the setup with prosim is so easy. To make gauges yourself get the pololu servo card they come in 8, 12, 18, and 26 form and are only about £20 to £36 and work of the bat with prosim. Phidget boards are also plug and play with prosim.
Here is a link to the servo cards
http://www.hobbytronics.co.uk/mini-maestro-servo-controller-24?keyword=servo

Jahanzeb
02-03-2015, 02:27 PM
hate to keep the thread alive, but thanks for all your help guys. special thanks to Jim. i havent played around much with link2fs in a year.. but plan to get back on it. making a lot of progress with building a cessna T210 pit. just love those analogue guages and equally fun making them. just fell in love with arduino. anyway, the new rasberry pi 2 came out today. its got a tons of cool features. anyone planning to implement that anytime soon?

as for the 737, i made the arduino into a duel joystick with 64 buttons. works flawlessly. used it to make a very "rough" overhead panel, just to see if its even possible. using mouse macros, and xpadder, i was able to assing keystrokes to every toggle switch. next i started building a CDU. i know.. pretty random. got carried away. anyway. was able to build yet another crude looking, but functional CDU, using a MIMO 7" LCD P n P display.
(man i wish i had a 3d printer)
so finally i decided to shift to P3D V2.4. absolutely visually stunning with the beautiful DX11 support. its kinda hard to go back to FSX. so.. just wanted to know if anyone made that switch.. and how does it affect cockpit building? does the link2fs work with prepar3d? can i still make mouse macros? can i make a complete switch?
again.. thanks for all your help guys! you rock