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

DIY Robocars via Twitter
RT @a1k0n: Decided to just see what happens if I run the sim-trained neural net on the car, with some safety rails around max throttle slew…
4 hours ago
DIY Robocars via Twitter
Saturday
DIY Robocars via Twitter
RT @SmallpixelCar: @a1k0n @diyrobocars I learned from this. This is my speed profile. Looks like I am too conservative on the right side of…
Saturday
DIY Robocars via Twitter
RT @a1k0n: @SmallpixelCar @diyrobocars Dot color is speed; brighter is faster. Yeah, it has less room to explore in the tighter part, and t…
Saturday
DIY Robocars via Twitter
RT @a1k0n: I'm gonna try to do proper offline reinforcement learning for @diyrobocars and throw away all my manual parameter tuning for the…
Friday
DIY Robocars via Twitter
RT @circuitlaunch: DIY Robocars & Brazilian BBQ - Sat 10/1. Our track combines hairpin curves with an intersection for max danger. Take tha…
Thursday
DIY Robocars via Twitter
RT @SmallpixelCar: Had an great test today on @RAMS_RC_Club track. However the car starts to drift at 40mph. Some experts recommended to ch…
Sep 11
DIY Robocars via Twitter
RT @gclue_akira: 世界最速 チームtamiyaのaiカー https://t.co/1Qq2zOeftG
Sep 10
DIY Robocars via Twitter
RT @DanielChiaJH: Always a good time working on my @diyrobocars car at @circuitlaunch. Still got some work to do if I’m to beat @a1k0n howe…
Sep 10
DIY Robocars via Twitter
RT @SmallpixelCar: My new speed profile for @RAMS_RC_Club track https://t.co/RtLb7TcgIJ
Sep 10
DIY Robocars via Twitter
RT @SmallpixelCar: Practiced at @RAMS_RC_Club today with my new @ARRMARC car https://t.co/AEu2hCx89T
Aug 28
DIY Robocars via Twitter
Aug 24
DIY Robocars via Twitter
RT @gclue_akira: 柏の葉で走行させてるjetracerの中身 #instantNeRF #jetracer https://t.co/giVvuE4hP7
Jul 4
DIY Robocars via Twitter
Cool web-based self-driving simulator. Click save when the AI does the right thing https://github.com/pncsoares/self-driving-car
Jul 4
DIY Robocars via Twitter
RT @donkey_car: Human-scale Donkey Car! Hope this makes it to a @diyrobocars race https://www.youtube.com/watch?v=ZMaf031U8jg
Jun 25
DIY Robocars via Twitter
Jun 25
More…