Hexacopter Atmega 328p and Camera Tilt

Post Reply
Stephan Oldenburg
Posts: 25
Joined: Thu Jan 03, 2013 11:04 pm

Hexacopter Atmega 328p and Camera Tilt

Post by Stephan Oldenburg »

Hi,

it's me again. :-)

Now I connected the camera tilt servo and activated in the sketch. The camera servo is digital and has a own BEC.
And the FC crashes again after a few seconds. :-(

It dosen't matter if the servo refesh rate is 50, 160 or 300 Hz.

I read somewhere in the net, that the 328p is not able to handle a hexacopter and the tilt servo (and I have a I²C-GPS).
In a other post is written it can handle it....

Is the 328p able to handle all that ?

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: Hexacopter Atmega 328p and Camera Tilt

Post by Alexinparis »

It was not possible in the past.
But it is now possible in 2.2

User avatar
Hamburger
Posts: 2582
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: Hexacopter Atmega 328p and Camera Tilt

Post by Hamburger »

with too many features you are likely crashing the stack - out of memory at runtime.
To test, disable the acc and try again.

User avatar
alll
Posts: 220
Joined: Fri Dec 07, 2012 9:53 am

Re: Hexacopter Atmega 328p and Camera Tilt

Post by alll »

Damn, scary, so you compile, upload, all is working, and then after a while you get "out of memory" :shock:
How to quantify this?
manu

User avatar
Hamburger
Posts: 2582
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: Hexacopter Atmega 328p and Camera Tilt

Post by Hamburger »

I was tracking such errors about 18 months ago for first time, so I added some diagnostic help.
Enable DEBUG & some LCD or pseudo LCD and execute the F(ree memory). You want at least 100 bytes margin. Or simply wait for unexpected resets and become suspicious. In most cases I have had to witness and track down, the reset will occur right during/after initialization; not too much dynamic stuff going on in MWii fortunately.

Like I said earlier, you could simply disable some features and observe if problem goes away, Repeat with different features. Take your clues.

Post Reply