It's a solution that you can build and upload the last APM 3.2.1 code for MEGAPIRATE BOARDS and AVR atmega2560 GENERICS BOARD with I2C bus communication.
As you know, megapirate team stop building APM and the last code was 3.1.5 version, we are desired work and port the last AVR APM 3.2.1 to this board, megapirate and AVR boards with atmega 2560 and I2C bus communication.
TESTED AND WORKING on MEGAPIRATE BOARDS:
- ArduCopter 3.2.1
- AntennaTracker 0.7.2
VIDEO WORKING APM 3.2.1 ON MEGAPIRATE:
https://www.youtube.com/watch?v=baIYXkhdYcU
1. SOFTWARE TOOLS REQUIRED
--------------------------
These tools you need to download first.
1.1 Arduino 1.0.3 with gcc-4.8.2 version download from this link:
http://firmware.diydrones.com/Tools/Arduino/ArduPilot-Arduino-1.0.3-gcc-4.8.2-windows.zip
1.2 Git tool, download from this link:
https://git-scm.com/downloads
2. STEPS FOR COMPILING
----------------------
2.1 Download and Decompress Arduino from section 1.1 to c:\arduino. You will see this order path c:\arduino\hardware\tools\avr\bin
2.2 Download and install GIT tool from section 1.2 to default path. NOTE.- in the steps windows install choose the option:
"Run Git from the Windows command Prompt"
2.3 Open Explorer and navigate to 'c:\' drive, right click and select "Git bash here", it's open a windows command prompt.
2.4 In prompt command line type the next command to clone ArduCopter-3.2.1_I2C branch as follow:
$ git clone https://github.com/hiro2233/URUS8.git ardupilot
$ cd ardupilot
$ git checkout ArduCopter-3.2.1_I2C
2.5 Open Arduino, go to File, Preferences, in "sketchbook location" click on Browse and choose the path where are the ardupilot folder you checkout with GIT,
in this case c:\ardupilot, ok and close.
2.6 Now load Arducopter sketch, compile and upload to the MEGAPIRATE board.
Enjoy!
BUILDING CODE FOR ANTENNA TRACKER
-------------------------------
1. SOFTWARE TOOLS REQUIRED
--------------------------
These tools you need to download first.
1.1 Arduino 1.6.6 version, download from this link:
http://arduino.cc/download.php?f=/arduino-1.6.6-windows.exe
1.2 Git tool, download from this link:
https://git-scm.com/downloads
1.3 fix_includes_arduino166 program, With this tool you can change all include headers files to work with arduino 1.6.6 in windows.
You need compile the code, it's included on repo branch master-AVR Tools/ArdupilotMega_ON_Generic_Board/
1.4 Notepad++, download from this link:
https://notepad-plus-plus.org/download/v6.8.8.html
2. STEPS FOR COMPILING
----------------------
2.1 Download and Install Arduino from section 1.1 to default path.
2.2 Download and install GIT tool from section 1.2 to default path. NOTE.- in the steps windows install choose the option:
"Run Git from the Windows command Prompt"
2.3 Download and install Notepad++ from section 1.4 to default path.
2.4 Open Explorer and navigate to 'c:\' drive, right click and select "Git bash here", it's open a windows command prompt.
2.5 In prompt command line type the next command to clone Ardupilot master-AVR branch as follow:
$ git clone https://github.com/diydrones/ardupilot.git
$ git checkout master-AVR
$ echo "ARDUINO=/c/arduino" > /c/ardupilot/config.mk
2.6 Compile Tools\ArdupilotMega_ON_Generic_Board\fix_includes_arduino166 with VS2013 or SharpDevelop (with this one was compiled).
Then you use as follow:
fix_includes_arduino166 -P <PATH_TO_FOLDER>
Example: Supose that you cloned Ardupilot in c:\ardupilot then you will have c:\ardupilot\libraries and you want make AntennaTracker c:\ardupilot\AntennaTracker then,
fix_includes_arduino166 -P c:\ardupilot\libraries
fix_includes_arduino166 -P c:\ardupilot\AntennaTracker
WARNING!
This tool make changes to the files in all librarie path and this tool doesn't make a backup of your files. You must be sure.
2.7 Open Arduino, go to File, Preferences, in "sketchbook location" click on Browse and choose the path where are the ardupilot folder you checkout with GIT,
in this case c:\ardupilot
2.8 Open the next file with notepad++, c:\ardupilot\libraries\AP_HAL\AP_HAL_Boards.h and replace this line #define AVR_ARDUINO_ENVIRONMENTS with //#define AVR_ARDUINO_ENVIRONMENTS. Save and close.
NOTE: If you uncomment this line, you are telling to Arduino make code for AVR Generic Board, but if you comment with this line with '//' you are telling to Arduino make code for APM2 Board.
2.9 Open AntennTracker in Arduino and compile.
ENJOY!
If you are looking for detailed and description file libraries modification follow the oficial PR on the oficial Ardupilot repo at:
https://github.com/diydrones/ardupilot/pull/3578 ;
(DEVELOPERS) AVR and MEGAPIRATE DEVELOPMENT SUPPORTS Version Boards
Chat discussions at https://gitter.im/dronebo/URUS8
(USERS) MEGAPIRATE and AVR SUPPORT
Forum Discussions and supports at http://drone.bo/foro/development-english/apm
Comments
Hi
Today I tried my Tricopter with this firmware, flies and flies very well.
Now work in fine tunning PIDs
The correct way to put the channels at the end to be correlative is this:
uint8_t static pinRcChannel [8] = {0, 1, 2, 3, 4, 5, 6, 7}; // ROLL, PITCH, THROTTLE, YAW, MODE, AUX2, CAMPITCH, CAMROLL
Telemetry Port not work no activity in any of them.
Had seen the activity previously that was mistakenly measured in TX side of minimOSD.
The GPS, and bluetooth working OK.
The only fault I could find is the telemetry. If anyone can give me some information and point me on how to investigate the problem would be appreciate.
Hiroshi good job!, Thank you for give a little breeze to white hair AIO Boards. I have Two of Them.
Best Regards
Jose A.
Hello
I think that there should be a problem with the port of telemetry with Crius V1.1
With version 3.1.5 telemetry was present in TX3 / RX3 but now no signal is seen. See next drawing.
I measured with an oscilloscope, apparently activity is observed in TX1 / RX1 but I can not receive any data've tried different BAUD RATES unsuccessfully.
I will continue perform tests.
Any help is welcome.
Thank you.
Hello
I think I've solved the problem.
This line appears in RCInput_APM2.cpp:
uint8_t static pinRcChannel [8] = {0, 1, 2, 3, 5, 4, 4, 6}; // ROLL, PITCH, THROTTLE, YAW, MODE, AUX2, CAMPITCH, CAMROLL
The number 4 I is doubled, I modified as follows:
uint8_t static pinRcChannel [8] = {0, 1, 2, 3, 5, 4, 7, 6}; // ROLL, PITCH, THROTTLE, YAW, MODE, AUX2, CAMPITCH, CAMROLL
Now the channels 6 and 7 work OK.
I hope this helps.
Best Regards
Incredible job much appreciated here, thank you very much! .
I need some help.
A crawl or mixture of between Channels 6 and 7 occurs.
The channels 1 through 5 and 8 appears work well but channels 6 and 7 in radio calibration working together and there are no mixer in the radio.
With MPNG 3.1.5 everything works correctly.
Any chance of fix it?
Thank you very much in advance.
Jose A.
Best Regards
@damian you can change the order as you are needing without problems. It's the default settings for my controller, i have a Graupner MX-20. Logging are not enabled for v2, it's tested only in v1 board that come without dataflash.
@linus you can compile on linux environments with make too.
static uint8_t pinRcChannel[8] = {0, 1, 2, 3, 5, 4, 4, 6}; // ROLL,PITCH,THROTTLE,YAW,MODE,AUX2,CAMPITCH,CAMROLL
may be better ?
static uint8_t pinRcChannel[8] = {0, 1, 2, 3, 4, 5, 6, 7}; // ROLL,PITCH,THROTTLE,YAW,MODE,AUX2,CAMPITCH,CAMROLL
Hi guys, anybody can supply a binary for me ? Im on Linux and have no access to a windows machine right now.
I want to make use of my AIOP boards but failed to get it compiling :(
#define LOGGING_ENABLED ENABLED
but no logs. MissionPlanner 1.2.99 FlightData screen/DataFlash Logs/Download DataFlash Log via mavlink "Cannot get log list" and no connect, need reseting flight controller.
All sensors is ok: baro,accel,compass, GPS Ne6 is working.
Good news!
We make this aerial video with this moded flight code fited in megapirate board and everything was very very good.
Loiter works very good.
https://www.youtube.com/watch?v=QIEWlwhSpe4
where can i change the rc Type
PWM inputs A8-A15
Thanks a lot
MABA