Arduino737

A how-to is an informal, often short, description of how to accomplish some specific task (Wikipedia)
Post Reply
User avatar
Clamb
Posts: 491
Joined: 21 Jun 2013, 13:48
Location: EDFM
Contact:

Arduino737

Post by Clamb » 15 Mar 2015, 13:56

Edit: Check github for latest version and issues/questions: https://github.com/Clamb94/Arduino737" onclick="window.open(this.href);return false;

Hi,
I've written a small code for the ArduinoMega2560 to allow simple communication with Prosim737 via the generic serial driver integrated in Prosim.
I'm using this code currently to control Gates via a relais card and for analog inputs like weather radar tilt, screen brightnes etc.
It works really really great without any noticeable delay.
After setup, the Arduino will talk directly to Prosim737 System via TCP or Serial connection. No other software needs to be running during normal operation.

Step-by-step instructions are included in the readme.

I'm working on an online documentation how to set everything up: http://arduino737.reinemuth.de/Help/Arduino737.html" onclick="window.open(this.href);return false;
-----------------------------------------
Currently supported functions:
- Buttons/Switches
- Outputs (LEDs / Gates /Relais etc.)
- Highspeed Encoders
- Analog inputs
- Ethernet (experimental)
- 7-Segment Displays

Future updates may include:

- PWM pins for brightness control
- Servo motors
- Support for the Arduino Due (more powefull CPU supporting way more than only 3 encoders)

-----------------------------------------
Requirements:

- Arduino Mega2560
- Arduino IDE
- .net Framwork 4.0 or above
- Arduino Encoder Libary
- Arduino LedControl Libary
- Prosim737

Tested with:
- Windows 7 64bit
- Arduino Mega2560
- Arduino IDE v1.6.4
----------------------------------------
Changelog:

v.0.6.1 (latest Version)

- added support for MAX72xx 7-Segments
- fixed a problem when using multiple 7-Segments
- 7-Segments will switch off when BAT off ("Allow -1 as frequency for inactive radios" must be on)

Note: It seems that Arduino Uno/Nano do not have enough internal RAM to support all functions.
Therefore only Arduino Mega2560 is supported right now.

Latest version always on github: https://github.com/Clamb94/Arduino737" onclick="window.open(this.href);return false;

Best regards
Axel Reinemuth
Attachments
image.jpg
Last edited by Clamb on 05 Dec 2016, 23:41, edited 23 times in total.
Image
Image

User avatar
LAKY911
Posts: 111
Joined: 11 Mar 2015, 22:50
Location: LKPR

Re: Arduino737

Post by LAKY911 » 16 Mar 2015, 09:53

Nice! I think you are doing very user-friendly code.
Thank you for this! I think this code will be using many users in future, because Arduino is really nice and cheap for cockpitbuilders.

Thank you!
Lukas

User avatar
Volante
Posts: 180
Joined: 28 Dec 2010, 21:29
Location: Oslo - Norway

Re: Arduino737

Post by Volante » 16 Mar 2015, 11:12

Thanks for this code! I am sure Arduino will be very popular amongst us with this approach.

Vidar

User avatar
Clamb
Posts: 491
Joined: 21 Jun 2013, 13:48
Location: EDFM
Contact:

Re: Arduino737

Post by Clamb » 16 Mar 2015, 13:33

I'm working on a simple Interface so you don't have to chany anything in the source-code :D
Attachments
Interface.PNG
Image
Image

User avatar
LAKY911
Posts: 111
Joined: 11 Mar 2015, 22:50
Location: LKPR

Re: Arduino737

Post by LAKY911 » 16 Mar 2015, 13:55

Very nice!

User avatar
Clamb
Posts: 491
Joined: 21 Jun 2013, 13:48
Location: EDFM
Contact:

Re: Arduino737

Post by Clamb » 24 Mar 2015, 18:38

First post updated to latest Version.
Image
Image

veiobilly
Posts: 8
Joined: 07 Apr 2015, 20:08

Re: Arduino737

Post by veiobilly » 07 Apr 2015, 22:12

I am doing a MCP and want to use 7-segment display with MAX7219 modules, will I be able to adapt the code?

NedHamilton
Posts: 588
Joined: 17 Apr 2012, 00:25
Location: North Carolina

Re: Arduino737

Post by NedHamilton » 07 Apr 2015, 22:39

This looks very intriguing.

But can someone explain to me how the Prosim connection works. The Arduino is USB but the instructions say to enable the Prosim Generic COM port/TCP driver.

How does that work? Does Prosim emulate a USB connection that makes the Arduino board look like a COM port?

Will it be possible to use one of the Arduino Ethernet boards? (I hate USB).
Ned

User avatar
dvincent
Posts: 4417
Joined: 14 Jun 2011, 11:21
Location: Nederland - Vlissingen
Contact:

Re: Arduino737

Post by dvincent » 08 Apr 2015, 07:31

Hi Ned,
support for Arduino is not foreseen in the immediate future as there is is enough in the pipeline (behind and beyond the user's scene) with other major known vendors.
Prosim does not emulate a Com port, that is not Prosim's business either. Enabling a Com port means enabling a Com port already emulated by hardware vendors like CP Flight, Flight Illusion and so on.
Anyway, my advise to everyone is buying hardware that is already known & supported (natively) by Prosim. I know Arduino and there is nothing wrong with the experimental & DIY idea behind it but it is not possible to re-invent the wheel each ime there is other hardware. That's too time-consuming for the development.
Thanks for thinking with us.
Regards,
Dirk

Image

User avatar
Clamb
Posts: 491
Joined: 21 Jun 2013, 13:48
Location: EDFM
Contact:

Re: Arduino737

Post by Clamb » 08 Apr 2015, 09:04

Hi Ned,
the Arduino emulates a serial Port via USB and Prosim connects to this serial Port, just like Dirk wrote.
I agree that native Arduino support with prosim is quite useless.
I'm working on this project mainly to improve my programming skills. In my own sim i'm using a arduino to control gates for Air conditioning fans, stickshakers and a parking brake release mechanism.

Currently it's not planed to use the Ethernet board, since they are quite expensive compared to an ArduinoMega2560 starting at 15€.
I may add it when I'm bored in the future :D

Interfacing 7-Segments is not yet possible, but is planed to be added in the future.
Currently I'm working on encoders, analog inputs and servos.
Image
Image

Post Reply

Return to “ProSimB738 - How-tos”