Coding for APM without APM =)

 

Right now I'm far away from home, but I've found some extra time to work on my code for APM. But how am I going to test it without APM? Here is the video which shows a successful run of modified APM code on virtual APM =)

"\n" is not working good on this emulator.

 

Here is what you need:

Arduino IDE  direct link

Proteus (I'm using v7.7 sp2)  Demo version (according to demo limitations it cannot save or modify any MCU simulations, but you won't need it - you can use mine in read-only way, no problems with changing firmware) UPDATE: Unfortunately, there is no way to run my simulation file unless you have full (paid) version of Proteus.

APM firmware source code v2.24 (use newest if available)

and my Proteus simulation file attached (or you can do you own - it is really simple) ardupilot_sim.rar

 

UPDATE2: It is also possible to use AVR Simulator from AVR studio with HAPSIM plugin to get it running, but on my netbook it is sooo slow - so I couldn't make the video. 

 

I hope it helps.

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • could you send me this file  ardupilot_sim.rar...i can´t download this file. cristianrokr@gmail.com and how I can simulate the movement of the servos in proteus??

    https://storage.ning.com/topology/rest/1.0/file/get/3689432229?profile=original
  • Weird, one person already asked me about that file and I've reuploaded it. So now error comes back. Send me a PM and I will send you that file.

  • Dear Yurezzz,

    I failed to download the "Ardupilot Sim.rar" from the link you have posted. The web page shows "Access Denied". I've managed Paid Professional Version of Proteus only for this one. Pl suggest me how can I get the "Ardupilot Sim.rar". Is possible that you can send this to me through email?

  • Yurezzz.

    Thank you very much for your quick reply.

  • @Jakaria - I think you can achieve what you want(although I didn't really get the idea) - but Proteus has one component which will emulate uart port of AVR and will output all data to real com-port of your PC.

  • Moderator

    I think I need a drink!

  • Yurezzz,

    Wonderful job. Pl suggest me, is it possible to do the below project with Proteus.

    Suppose I'm in a real Ship and I want to run my ship with a PC based autopilot and Gamepad. GPS should be connected to the PC and all calculations should be done by the PC (can the PC Autopilot portion done by Proteus with APM code). Then PC should send the final servo commands to a simple Microcontroller and Microcontroller will do the speed control, servo control etc. If possible I want to interface the project with a good Ground Control Station which supports Gamepad. No RC is needed as I'm onboard the ship. Pl suggest me  elaborately because I've almost zero knowledge about programming.

  • Updated the first post with info about free software emulation.

  • Thanx!

  • Developer

    @Yure, the desktop build is a way to build ArduPlane and ArduCopter with the g++ compiler for any CPU you like (eg, for X86 or X86-64). If you are on Linux or MacOS, you do this:

      cd ArduPlane

      make -f ../libraries/Desktop/Makefile.desktop clean hil

    It will build a ArduPlane.elf file, which you can run as a native executable. The serial ports are mapped to TCP sockets.

    MichaelO has also managed to get it building on Windows using Cygwin. He can give you more information on that.

     

     

This reply was deleted.