HOW TO: Virtual Cockpit / Device Link
Moderators: Board of Directors, Command
Re: HOW TO: Virtual Cockpit / Device Link
Give me a shout if you need any help.
Re: HOW TO: Virtual Cockpit / Device Link
My main question is : is there a way to send directly numbers via serial port ?
I think I have to convert them before the serial, from the C#, then after the serial in my Arduino...
I'm trying to make a "simple" thing : have a red LED when gear up, a green one when down.
I'm able to read the gear position via DL and export the value (set to short) to the console.
On the other hand, I can't figure how to have a simple 1 or 0 to be read by my Arduino Uno... I mean like a real 0 or 1.
I think I need to convert the gear value (short) to somethning else but what ? Byte ?
I think I have to convert them before the serial, from the C#, then after the serial in my Arduino...
I'm trying to make a "simple" thing : have a red LED when gear up, a green one when down.
I'm able to read the gear position via DL and export the value (set to short) to the console.
On the other hand, I can't figure how to have a simple 1 or 0 to be read by my Arduino Uno... I mean like a real 0 or 1.
I think I need to convert the gear value (short) to somethning else but what ? Byte ?
Re: HOW TO: Virtual Cockpit / Device Link
I don't have an arduino so can't check, but a quick Google reveals: http://arduino.stackexchange.com/questi ... ule-serial.
The last answer suggests serial.parseInt(), the reference to which is here:
https://www.arduino.cc/en/Serial/ParseInt
The last answer suggests serial.parseInt(), the reference to which is here:
https://www.arduino.cc/en/Serial/ParseInt
Re: HOW TO: Virtual Cockpit / Device Link
Thank you Donkey, I'll try that.
Re: HOW TO: Virtual Cockpit / Device Link
That is working !
At least I've got a green light when my gear is down.
With C#, I convert Double to String,
With Arduino, I use serial.parseInt() (thanks Donkey), then convert to Int and compare result to a condition.
This is not an easy task, but I'm learning !
At least I've got a green light when my gear is down.
With C#, I convert Double to String,
With Arduino, I use serial.parseInt() (thanks Donkey), then convert to Int and compare result to a condition.
This is not an easy task, but I'm learning !
Re: HOW TO: Virtual Cockpit / Device Link
Fantastic news Miki, superb stuff!
Re: HOW TO: Virtual Cockpit / Device Link
Ok, let's go for a video.
First of all : it's WiP and I have a lot of things to do to get this gear indicator working well.
=> for example, the red LED is blinking, and it is not good. I have to fix that.
Devicelink seems to be a little more faster sending data, than in game, but I can add a short delay, etc etc.
Anyway, I think the principle is here.
I start with gear retracted, then put it down.
First of all : it's WiP and I have a lot of things to do to get this gear indicator working well.
=> for example, the red LED is blinking, and it is not good. I have to fix that.
Devicelink seems to be a little more faster sending data, than in game, but I can add a short delay, etc etc.
Anyway, I think the principle is here.
I start with gear retracted, then put it down.
Re: HOW TO: Virtual Cockpit / Device Link
This is great stuff Miki. I may have to buy myself an arduino...
- Dickie
- Group Captain
- Posts: 13855
- Joined: Sat Jul 14, 2012 12:15 pm
- Location: Gloucestershire, England
- Contact:
Re: HOW TO: Virtual Cockpit / Device Link
Miki, if you are willing, it would be great to release your program to the wider community with instructions. We can put it for download somewhere in ACG anyway.
Great work!
~S~
Great work!
~S~
Re: HOW TO: Virtual Cockpit / Device Link
For sure I'll do.
But I still have changes to make. As soon as I am happy with the result, I'll post.
But I still have changes to make. As soon as I am happy with the result, I'll post.