Hey guys!

I know everyone here has moved on to the newer better boards, but I'm working with a buddy of mine who has the old Oilpan board and the 1280 Ardupilot board. He started a project on it, then, a virus took over his PC and lost everything. Project sat shelved and now he's looking to get it back up and running. Asked me if i'd help him get back to where he was...

He was able to upload and talk to the board, run simulations in mission planner, talk to it just fine, etc

But that was some years ago! Ive done some digging and tinkering. I can get arduPlane 2.4 to compile just fine on Arduino 0.22. But where does one add/modify code to add sensors/motors and such? Is this the latest versions that can be run with this board setup?

I see the newer versions have a "UserCode.pde" file. 

I got a bit confused on when the current APM Planner asked for a .bin or .px4 file on the custom firmware upload. Lead me to believe that any modifications he's looking to do have to be done in something other than Arduino?

I was sitting here brute force compiling on different versions of the ArduinoIDE including the custom one for ArduPilot, trying to find the latest versions. Unless theres a historical WIki im missing?

Sorry for my newbness guys! I Figured I'd ask before i brick anything. Thanks in advance. 

Views: 250

Reply to This

Replies to This Discussion

I don't know of any old versions of the 1280 code that is available, but you can ask around. The old code may not be supported by the mission planner though. If you are a programmer then you might want to write your own code. I have an APM1.0 with a 2560 cpu that flies good under manual control with just a few lines of code.

Writting my own code is what we're after...I guess I'm a bit lost though on WHERE one modifies what exists.But i would need some datasheets to talk to everything

Hah! i didn't think itd be difficult finding the history on this thing


Care to share some of what you've done with your few lines John?

To operate the motors you just have to include the APM_RC library and the Arduino_Mega_ISR_registry library files that you can copy from any of the newer APM code. Then in your main loop use a command like:

APM_RC.OutputCh(0,1500);

APM_RC.OutputCh(1,1500);

APM_RC.OutputCh(2,1500);

APM_RC.OutputCh(3,1500);

to read the sensors use some code like this:

ADC_SPI_transfer(adc_cmd[0]);
uint8_t ch=0;
int16_t v;
while(ch  < 8) {
v = ADC_SPI_transfer(0) 8;            
v |= ADC_SPI_transfer(adc_cmd[ch + 1]);
if (ch == 0) z_gyro = (v-z_gyro_zero);
if (ch == 1) x_gyro = (v-x_gyro_zero);
if (ch == 2) y_gyro = (v-y_gyro_zero);
if (ch == 4) y_accel = (v-y_accel_zero);
if (ch == 5) x_accel = (v-x_accel_zero);
if (ch == 6) z_accel = (v-z_accel_zero);
if (ch == 7) sonar = v;
ch++;}

If you just want something that will barely fly your APM manually just input a radio signal and add or subtract the gyro variables from your motor values. It might not be very stable though.

Reply to Discussion

RSS

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service