Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 34
  1. #11
    500+ This must be a daytime job



    Join Date
    Jan 2007
    Location
    NEW ZEALAND
    Posts
    908
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Arduino Interface Program DVA2FSX

    Thanks Diego,
    Well done and nice to see someone else downunder contributing to Fsim.
    Thanks again
    Regards
    Les
    P.S i just tried it on a Duemilanove, dont know if it should work on this. Get comport error message. Telling me that Comport Name is invalid. Change the name in .ini to COM=
    and this message dissappears. Still will not find the Board. In the ide the board is found and i can upload my program.Comport number is correct, used the same one as ide reports. Im using Win7 64 bit .
    Thaks
    Les
    Last edited by iwik; 01-08-2012 at 04:02 PM. Reason: Added extra info

  2. #12
    75+ Posting Member
    Join Date
    Aug 2007
    Location
    Australia
    Posts
    86
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Arduino Interface Program DVA2FSX

    Hi Les,

    I would assume that the Duemilanove should work as it is the same chip, but i am not 100% certain as I do not own one.

    Did you upload the A2FSX firmware first? This must be done otherwise my program will not recognise the Arduino card and you will receive an error.

    You can do this as follows. Open up DVA2FSX. You will receive an error about the AutoDetection failing. Use the TOOLS menu - > Upload firmware. Then type in the com port you Arduino is connected to, eg COM1, COM2 ETC....

    Restart the program.

    If my firmware is not on the Arduino, A2FSX will not recognise the card...

    Cheers
    Diego

  3. #13
    500+ This must be a daytime job



    Join Date
    Jan 2007
    Location
    NEW ZEALAND
    Posts
    908
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Arduino Interface Program DVA2FSX

    [Hi Diego,
    Thanks for replying. Yes i did what u suggested and this is what i get when trying to upload firmware.
    Also if i use your statement in .ini file ie COMPORT=x then the following comport error is reported.Changing this to COM=1
    and this error goes. I see that The UNO and my board use different usb drivers, dont know if this accounts for the problem.
    Here are the two pics.

    UPLOAD ERROR.jpg
    com error.jpg

  4. #14
    75+ Posting Member
    Join Date
    Aug 2007
    Location
    Australia
    Posts
    86
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Arduino Interface Program DVA2FSX

    Hi Les,

    the COMPORT must be specified as COMX.. So in your case COMPORT=COM2.. however this wont help as the problem seems to be the upload of the firmware to the arduino which is done by AVRDUDE.EXE.. which is external to my program. This will need to be fixed first..

    Lets try the following..
    1. Delete 2 from COMPORT=2 so it is just COMPORT=.
    2. Try uploading a simple project to the Arduino from the IDE eg maybe Example->Basic->AnalogReadSerial.
    3. once that works... close the arduino ide.. reset your arduino unplug and replug and try to upload the firmware again via my program... Make sure you specify COM2 and not 2 when you are asked which comport you would like to upload the firmware to.
    4. if this fails again, please try uploading the firmware manually with avrdude.exe (located in the same folder as DVA2FSX). The command is as follows "AVRDUDE.EXE -p atmega328p -c arduino -P COM2 -U flash:w:dva2fsxv10.hex"
    5. If this fails you may need to specify your baud rate. ie "AVRDUDE.EXE -b 9600 -p atmega328p -c arduino -P COM2 -U flash:w:dva2fsxv10.hex"

    let me know how you go
    Cheers
    Diego

  5. #15
    500+ This must be a daytime job



    Join Date
    Jan 2007
    Location
    NEW ZEALAND
    Posts
    908
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Arduino Interface Program DVA2FSX

    Diego,
    Using option 4 gave me no errors, option 3 nogo. Now when i run your program ,i see com2,Connected, Firmware no entry and the box
    lower left says Arduino Firmware and then i get message Timeout Please restart program.
    So we are getting there. Thanks for all the effort.
    Les

  6. #16
    75+ Posting Member
    Join Date
    Aug 2007
    Location
    Australia
    Posts
    86
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Arduino Interface Program DVA2FSX

    Hi Les,

    Thats wierd as option 4 is exactly what my program does in the background.

    This new issue may now possibly be a com port baud/speed issue. DVA2FSX really needs to run at 115200. Maybe the USB Controller on your Arduino is not realible at that speed.

    Open up your Arduino IDE set the baud to 115200 and use the Serial Monitor to see if you get a response from the board. The response should be DVA2FSXv10, which is the firmware version...

    The program may need to be adjusted to a larger timeout, but in reality that is not feasible as it is currently set to 5 seconds, and if we have to wait 5 seconds for each response, we are in trouble!!!

    Try the above let me know how you go.. Hopefully someone using this with the UNO can post their experiences.

    Cheers
    Diego

  7. #17
    500+ This must be a daytime job



    Join Date
    Jan 2007
    Location
    NEW ZEALAND
    Posts
    908
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Arduino Interface Program DVA2FSX

    Diego,
    Nothing comming thru on serial monitor. Sorry i put you slightly wrong. When i run the avr software i get the same message
    as i did when trying to upload in dva2fsxb01.
    Maybe we wait till someone with UNO tests. If you come up with any other ideas im quite keen to test.
    Take Care and Thanks
    Les
    P.S
    Did some research and it looks like the uno bootloader can operate at 115k, the older board
    i have doesnt. So im going to redo the bootloader(optibootloader) and then my board will
    look like a Uno. Heres hoping, will make my board quicker also. I think the error on loading your firmware is baud rate.
    Last edited by iwik; 01-08-2012 at 11:57 PM. Reason: added more info

  8. #18
    500+ This must be a daytime job



    Join Date
    Jan 2007
    Location
    NEW ZEALAND
    Posts
    908
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Arduino Interface Program DVA2FSX

    Hi Diego,
    I updated my Board to a Uno by loading a new bootloader( Optiboot). Flashed the chip by your suggested manual method 1 and the board reports the version nicely. I couldnt program it via tools in your program, it just came with the timeout error.
    Will try it out in Fsim tomorrow.
    Regards
    Les

  9. #19
    500+ This must be a daytime job



    Join Date
    Jan 2007
    Location
    NEW ZEALAND
    Posts
    908
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Arduino Interface Program DVA2FSX

    Good morning Diego,
    Having a wee play and need a bit more info. Analogue inputs, put a pot on one input and turned it ot min and pressed min
    button followed by max pos and the set with button. Saved the went back to front i/f and noticed when turning the pot
    the values arnt what i set in cal. They tend drift up in value and no way near what i caled for.
    With the servo,you say digital output 8-13, does this relate to the pin numbering on the board. If so i thought that onl
    3 5 6 9 10 and 11 could only be used for PWM output to servos. What is correct way to cal these. As when fitting a servo
    it just joggles around.
    Hopfully you can clear up some confusion on my side.
    Thanks
    Les
    P.S Maybe i just cant use the program because of the speed you are sending data to the Serial
    chip.By manually loading your firmware,i am doing it at 4600. When doing from your software
    its much faster isnt it. Maybe the other things mentioned above are related.We will wait and see
    if any other UNO users have any problems first.
    Would there be any chance you could slow it down just so i could satisfy myself. It just my curiosity. Just tried the serial monitor in iDE at 115k and it reports the Firmware version fine.
    Be interested in your comments

  10. #20
    75+ Posting Member
    Join Date
    Aug 2007
    Location
    Australia
    Posts
    86
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Arduino Interface Program DVA2FSX

    Morning Les,

    Good to see some progress on your side.

    With Analog inputs, the min and max button will control the minimum limit and maximum limit of the pot during calculation into FSX.. The numbers on the main form are the RAW figures coming from the pot. So yes you can set mins and max during calibration and on the main form you will see those figures exceed min and max if you turn your pots over those limits, but the calculations into FS respect the min and max. You can open FSX to see this. Does this make sense?

    For servos, pins 8-13 are for SERVOS.. despite what it says in the manual regarding PWM, there is a debate that servos use PPM instead, which can be done on any pin... So connect your servos on PIN 8-13 and then use the Servo button to calibrate. They should jump around only when you first hook it up, then you can use the slider to move the position of the servo to work out mins and max. Ensure you have enough power to supply to the servo or wierd things may happen.. Also ensure proper grounding of the circuit as i have noticed the board is very sensetive.

    Try the above.. let me know how you go.. i dont think what you are seeing is related to the baud rate, now that you are using the new bootloader.

    Cheers

    Diego

Page 2 of 4 FirstFirst 1234 LastLast