Hi,

I am running APM v3.0 on new Arduino HAL version. It compiles and runs all seems good. My settings are:

Visual Studio 2010 on Windows 7
Arducopter v3.0 (from github) for APM 2.5

--
Compiling 'ArduCopter' for 'Arduino Mega 2560 HAL (Apm 2)'
Binary sketch size: 234746 bytes (91% of a 258048 byte maximum) (35.75 secs)
Uploading to I/O board using 'COM13'
Done uploading

Problem:
----

I am not new to programming arduino's, however the problem is unique with this version.

Putting a simple print statement "Hey" in the loop()


cliSerial->print("Hey, ");

The following output shows that writing a simple print, restarts the board everytime??

Running Serial Monitor: Brings up the following output:

Hey, Hey, Hey,Hey,Hey,Hey?3!?

Initialising APM...

Hey?ey,Hey,Hey,Hey,Hey,Hey,Hey,Hey,Hey,Hey,Hey,Hey,Hey,Hey,,Hey,Hey, Hey, Hey, Hey &Hey, Hey, Hey
Hey

Initialising APM...

----

-Note: Initialising APM... statement is called from one of the functions from within the setup() function.

 Initialising APM... message is from a mavlink_delay_cb() function in GCS_MavLink.pde.

1. Does it reboot the board with such a simple print statement?

2. Can someone point me out what the problem is. Connected over a serial port (115200 baud rate). Is there not enough RAM to do such a task. Look forward to your inputs. It can be easily reproduced.

Thanks,
Shyam

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

Join diydrones

Email me when people reply –

Replies

  • You want to put this in one of the slower loops, such as inside three_hz_loop . You are probably blocking the execution of the rest of the code for enough time that safety features of the APM decide the code has crashed and the board needs to be restarted. You should familiarize yourself with the scheduler (line 855 in my ArduCopter.pde) . loop() runs the scheduler and the code is not designed to have anything in loop except for the scheduler.

  • Did you make any progress with this? I am trying to do something very similar and when I bring up any tool for monitoring the serial port, it reads about 1000 bytes of data until everything freezes up. It is quite strange.

This reply was deleted.

Activity