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.

Views: 1926

Comment by Michael Oborne on November 11, 2011 at 1:10am

nice job

ive been lpaying wihth SIL/Desktop build, but this adds another level

Comment by Michael Oborne on November 11, 2011 at 1:12am

one thing i dont see you mention. do you build for 1280 or 2560?

Comment by Andrew Tridgell on November 11, 2011 at 1:44am

nice work! You might also like to take a look at the APM Desktop build. Have a look at my recent posting on the autotest system for some pointers.


Comment by YureZzZ on November 11, 2011 at 1:56am

I'm building for 1280 but in Proteus file you can change atmega to 2560 and it is going to be fine. For HIL mode and for my case to test CLI mode error message it is working fine.


What is Desktop build? Where can I get info on it? Never heard about it, except the folder on GIT.

Comment by Alfred Riopel on November 11, 2011 at 8:01am

question about making changes to the APM code. if you make changes like output servo mixing or motor to servo output (to change from quad to bi-rotor ) will the Planner still function to adjust pid's? How much can be changed without having to change the planner too?

Comment by YureZzZ on November 11, 2011 at 8:44am

If you change anything in code but it still can be changed with Planner - it is ok. But if you want to create new parameters - you'll have to add them as new variables to the main class.

Comment by Andrew Tridgell on November 11, 2011 at 9:07pm

@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.



Comment by YureZzZ on November 11, 2011 at 10:48pm


Comment by YureZzZ on November 13, 2011 at 12:20am

Updated the first post with info about free software emulation.

Comment by Jakaria on November 15, 2011 at 1:54pm


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.


You need to be a member of DIY Drones to add comments!

Join DIY Drones

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service