Is there a away to connect the servo to apm? i would like to use the gyro inside the apm. so that it able to move the servo when the apm move. something like stabalisation
any one help pls.... i really need help. anyone will do
Tags: apm, codes, connect, gyro, help, motor, move, need, servo, stabalisation

Permalink Reply by Michael Pursifull on September 11, 2011 at 12:59am I think it is enabled now already, on channel 5 for roll, and channel 6 for pitch. See Camera.pde for details. If it does not work, I have a hack you can try. But just connect go to your radio setup, make sure you have channel 5 and 6 configured, then power off, connect servos, and see if it works. If it doesn't work, let me know...
sorry, backwards, I think it is ch 5 for pitch, and ch 6 for roll
I should also say that I mean channel 5 and 6 OUTPUT. Channel 5 input is used for modes. I have used channel 6 and 7 in the past, for manual camera control, but I need to read through the code as it is now to understand it all. In any case, give it a try on 5 and 6, I'll do the same here (w/o my ugly hacks)
Permalink Reply by Obertan on September 11, 2011 at 1:18am ok i try. is there a need to write codes to apm? i would like to edit some codes for the servo?
where can i get the camera.pde?

Permalink Reply by Michael Pursifull on September 11, 2011 at 1:30am you can change things if you need to, for example, reverse the direction, or change the amount the servo moves. I have many changes ... I have a bad rx cable [that I made], so I edited things until I can fix the cable, but for me the roll servo works fine already with existing code. I cannot test pitch right now.
See camera.pde and ArduCopterMega.pde for more information. But just try it first :)

Permalink Reply by Michael Pursifull on September 11, 2011 at 1:38am To change things, if you haven't already, you can do this:
1) Get Arduino IDE
2) download ArduCopter code from code.google.com website http://code.google.com/p/arducopter/downloads/list
3) copy ArduCopterMega and library folders into your arduino sketch directory
4) restart Arduino IDE
5) Open Arduino/ArduCopterMega/ArduCopterMega.pde
6) select Tools->Board Arduino Mega 2560
7) connect USB, select Tools->Serial Port (your port)
8) Edit code....
9) save file
10) verify (looks like "play" button)
11) upload code (looks like right arrow with dots), wait for Upload Complete
12) test
13) go to #8 :)
Remember to use Mission Planner to setup (radio, etc)
Remember that USB does not power RX or servo, you need main power rail like BEC or battery
Happy hacking!
Permalink Reply by Obertan on September 11, 2011 at 2:18am so i just need to copy the camera.pde to my arduino n save it?
the rest can ignored rite?
the board im using is arduino mega 1280. can it b uploaded?

Permalink Reply by Michael Pursifull on September 11, 2011 at 2:25am sorry, no, camera.pde does not work alone. It is part of the ArduCopterMega.pde
I only say "look at camera.pde" because you will be interested in this IF you want to edit.
Use Mission Planner. Load firmware. Setup (w/ Radio) Power off. Add servo to #5. Add servo to #6. Test. :)

Permalink Reply by Michael Pursifull on September 11, 2011 at 2:36am I do not have mega 1280, but 2.0.41 is 124044 bytes, so I think mission planner is ok to upload 2.0.40/2.0.41 to the mega 1280. I think 1280 is ok up to 126976 bytes. But someone else knows better. Still, easy to just try :)
Just like servos, try how they work on #5 and #6. If you do not like, then we can talk more about how to edit the code?
BTW, I am new here. I have not broken enough things to be an expert. So be careful with anything I say to try, because it is maybe wrong :)
Permalink Reply by Obertan on September 12, 2011 at 6:02am i dont wan to use mission planner.
can i use visual studio(VS)? i have tried out some simple code using the VS like simple led blinking and it works sometimes.
So my qns is i b able to use VS only? i just wan codes to uploaded to apm.

Permalink Reply by Michael Pursifull on September 12, 2011 at 10:29am if you only want to upload code, I recommend using Arduino IDE:
http://www.arduino.cc/en/Guide/HomePage
You can use the Arduino IDE only, but you will want to consider using some type of ground control station that uses MAVlink, like Mission Planner, HK GCS, or QGroundControl eventually to get telemetry... but it is not required.
Permalink Reply by Obertan on September 13, 2011 at 6:44pm for visual studio, i downloaded the software that enable to use arduino IDE and visual studio. the software can get from this: http://www.visualmicro.com/
i hope the creator dont mind upload the website.
I still need to use the ground station? I just wan the code that able to work for my servo to move. :)

Permalink Reply by Michael Pursifull on September 13, 2011 at 7:36pm Oh, I understand, you intend to use an extension to Visual Studio that allows you to code for Arduino. OK. I do not use Visual Studio, but it looks like a lot of people would like that, for people who already use Visual Studio. I mainly use vi, sometimes emacs. But for IDEs I sometimes use Xcode and Arduino. Whatever works for you is ok by me. I'm sorry, I do not use it so I cannot offer advice, but it looks like it will work.
For the stabilization, you can use load ArduCopterMega 2.0.42 or any version you find here and you can connect the roll servo to #6 and the pitch servo to #5 output on the APM and you will already have stabilization. You can look at the code to see how it is done. If you want custom code to only use the gyro to drive camera stabilization then I do not think it is very hard to make. If that is what you want, maybe you can tell me more about what you need? Is it for a project at work or school or just to see how it is done? Help me to understand so I can suggest where to look, ok?
Permalink Reply by Obertan on September 13, 2011 at 10:37pm Its ok, just try your best in watever you can do.
Yes, i have downloaded the codes that needed. I have read the code for camera stabalisation. I have find out that output 5 and 6 is for pitch and roll servo.
I have compile and upload but it still does not work :( there is error.
I dont know if the error u wil able to solved it. Im still using VS 2008 for my project. This is for my school project. I hope it able to work within this week.
Thank you in advance
Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.51 members
184 members
11 members
182 members
1290 members
© 2013 Created by Chris Anderson.
Powered by
