Condor 2 Arduino - sourcefiles available
Condor 2 Arduino - sourcefiles available
Hi all,
I decided to share my 'pivate' project to build a home simulator with Condor and Arduino.
You can find the sources here: https://github.com/Enrico66nl/Condor2Arduino
What this code does is:
- read the sent UDP-file from Condor into a string
- Get the needed variables from that string
- Convert them into Bytes (I first sent them as strings but my arduino drowned and it ran slow)
- send it through a COM to arduino
- Re-convert the bytes in the arduino into readable variables
- Send it to stepper motors, Servo's LCD's or whatever you want.
Please note: This code is 'as is'. No support from me. I am not a programmer, this is all teach-yourself-stuff.
I know I would have liked to see examples of coding so thats why I share it here.
Be safe #stay@home!
Eric
I decided to share my 'pivate' project to build a home simulator with Condor and Arduino.
You can find the sources here: https://github.com/Enrico66nl/Condor2Arduino
What this code does is:
- read the sent UDP-file from Condor into a string
- Get the needed variables from that string
- Convert them into Bytes (I first sent them as strings but my arduino drowned and it ran slow)
- send it through a COM to arduino
- Re-convert the bytes in the arduino into readable variables
- Send it to stepper motors, Servo's LCD's or whatever you want.
Please note: This code is 'as is'. No support from me. I am not a programmer, this is all teach-yourself-stuff.
I know I would have liked to see examples of coding so thats why I share it here.
Be safe #stay@home!
Eric
Re: Condor 2 Arduino - sourcefiles available
Thanks a lot
just a simple question : how do you connect the condor udp port to arduino ?
Adolfo
just a simple question : how do you connect the condor udp port to arduino ?
Adolfo
Re: Condor 2 Arduino - sourcefiles available
Hi Adolfo,
My program is an interface between Condor and the Arduino.
It reads the UDP data from the port of your choice. It then converts that data and sends it to a Com-port. Also of your choice.
So to answer your question: I do not send Condor UDP data directly to an arduino.
Greetings,
Eric
My program is an interface between Condor and the Arduino.
It reads the UDP data from the port of your choice. It then converts that data and sends it to a Com-port. Also of your choice.
So to answer your question: I do not send Condor UDP data directly to an arduino.
Greetings,
Eric
Re: Condor 2 Arduino - sourcefiles available
I revisited my project as we are going to build a real simulator.
Changed some stuff:
- Speed is now sent as raw speed, not the converted speed (was kmph)
- Added extra decimal value to the vario's for more precision
- fixed some minor (potential) bugs
Changed some stuff:
- Speed is now sent as raw speed, not the converted speed (was kmph)
- Added extra decimal value to the vario's for more precision
- fixed some minor (potential) bugs
Last edited by Sam66 on Fri Nov 27, 2020 8:37 am, edited 1 time in total.
Re: Condor 2 Arduino - sourcefiles available
added the condor2arduino exe file.
greetings, Sam66
greetings, Sam66
You do not have the required permissions to view the files attached to this post.
Re: Condor 2 Arduino - sourcefiles available
and the arduino file
You do not have the required permissions to view the files attached to this post.
Re: Condor 2 Arduino - sourcefiles available
Hello,
i have small problem with your program.
Is it working with Condor 2?
When i start Condor/free flight and then C2A Interface - port 55278 - connect i can see runnig data in frame. But when i try connect arduino (in the interface) the interface is freeze. After unplug arduino from pc the Interface is again runnig.
I have Arduino on COM3 same as in interface. Interval (ms) is default 30.
(sorry for my english )
mrak
i have small problem with your program.
Is it working with Condor 2?
When i start Condor/free flight and then C2A Interface - port 55278 - connect i can see runnig data in frame. But when i try connect arduino (in the interface) the interface is freeze. After unplug arduino from pc the Interface is again runnig.
I have Arduino on COM3 same as in interface. Interval (ms) is default 30.
(sorry for my english )
mrak
Re: Condor 2 Arduino - sourcefiles available
Hi Mrak,
I will let you know if I find something wrong. And yes, I use Condor v2
Update: I tested it and I cannot find a problem. I tested it with both 19200 and 9600 connection to an Arduino Mega on COM3.
with the sketch found in this thread. Also without a proper sketch the program keeps running. I am sorry Mrak, I have no clue what is wrong.
Has anyone else tried the program?
I will let you know if I find something wrong. And yes, I use Condor v2
Update: I tested it and I cannot find a problem. I tested it with both 19200 and 9600 connection to an Arduino Mega on COM3.
with the sketch found in this thread. Also without a proper sketch the program keeps running. I am sorry Mrak, I have no clue what is wrong.
Has anyone else tried the program?
Re: Condor 2 Arduino - sourcefiles available
I have clon of the Arduino Leonardo. Do you think that this can be the problem?
Re: Condor 2 Arduino - sourcefiles available
Hi Mrak,
I do not think that it is the problem. Failed connections should not cause the main program to freeze.
I have updated my code so it catches error's, could you try this version please? (see attachment v2.1)
I do not think that it is the problem. Failed connections should not cause the main program to freeze.
I have updated my code so it catches error's, could you try this version please? (see attachment v2.1)
You do not have the required permissions to view the files attached to this post.
Re: Condor 2 Arduino - sourcefiles available
Hi Sam66
the issue is still same.
Interface is runnig and reading data from Condor (without connected arduino).
Interface is freezing with connected arduino. I cant move or do anything with Interface, but after physically unplug the Interface is unfreeze and data continues.
the issue is still same.
Interface is runnig and reading data from Condor (without connected arduino).
Interface is freezing with connected arduino. I cant move or do anything with Interface, but after physically unplug the Interface is unfreeze and data continues.
You do not have the required permissions to view the files attached to this post.
Re: Condor 2 Arduino - sourcefiles available
Hi Mrak,
I am out of ideas. I have tested it, as well as others and we cannot reproduce your problem. Does your arduino work with other software who uses com-port? In the forum someone else has made a similar program as mine. https://github.com/kbobrowski/CondorUDP2COM
That did not really work for me but maybe it works for you?
I will continue to try and find a solution, but I am not a programmer. This is all self-tought-code
I am out of ideas. I have tested it, as well as others and we cannot reproduce your problem. Does your arduino work with other software who uses com-port? In the forum someone else has made a similar program as mine. https://github.com/kbobrowski/CondorUDP2COM
That did not really work for me but maybe it works for you?
I will continue to try and find a solution, but I am not a programmer. This is all self-tought-code
Last edited by Sam66 on Tue Dec 01, 2020 2:51 pm, edited 1 time in total.
Re: Condor 2 Arduino - sourcefiles available
Mrak,
maybe the problem is the settings of the port I used:
SerialPort(name, baud, Parity.None, 8, StopBits.One);
so:
Name = name from the dropdownlist (COM3)
Baud = Value from dropdownlist
Parity = None,
Databits = 8
Stopbits = 1
maybe the problem is the settings of the port I used:
SerialPort(name, baud, Parity.None, 8, StopBits.One);
so:
Name = name from the dropdownlist (COM3)
Baud = Value from dropdownlist
Parity = None,
Databits = 8
Stopbits = 1
Re: Condor 2 Arduino - sourcefiles available
Hi Sam
this is settings of my port.
I think that i tried everything, but problem is still same.
this is settings of my port.
I think that i tried everything, but problem is still same.
You do not have the required permissions to view the files attached to this post.
Re: Condor 2 Arduino - sourcefiles available
Hi Sam,
maybe i found solution for Arduino Leonardo - forum.arduino.cc
"The Leonardo, and probably the Micro, need to have Serial::DTREnable set to true, in the C# app. Other Arduino boards do not."
The reason should be that Leonardo have different type of USB chip. Please could you check settings of the Serial port in the C#?
https://forum.arduino.cc/index.php?topic=425982.0
maybe i found solution for Arduino Leonardo - forum.arduino.cc
"The Leonardo, and probably the Micro, need to have Serial::DTREnable set to true, in the C# app. Other Arduino boards do not."
The reason should be that Leonardo have different type of USB chip. Please could you check settings of the Serial port in the C#?
https://forum.arduino.cc/index.php?topic=425982.0