Compiling ArduRover2.41

I am attempting to compile the ArduRover 2.41 code with ArduPilot-Arduino-1.0.3. The sketch path points at the ArduRover2 and the library files.

Here are the errors received. Can anyone tell me what I am leaving out or doing wrong?

Here is where the compile stops in APMrover2.pde file.

#if CONFIG_INS_TYPE == CONFIG_INS_MPU6000
AP_InertialSensor_MPU6000 ins;
#elif CONFIG_INS_TYPE == CONFIG_INS_PX4
AP_InertialSensor_PX4 ins;
#elif CONFIG_INS_TYPE == CONFIG_INS_STUB
AP_InertialSensor_Stub ins;
#elif CONFIG_INS_TYPE == CONFIG_INS_OILPAN
AP_InertialSensor_Oilpan ins( &adc );
[color=#BF0080]#else[/color]
#error Unrecognised CONFIG_INS_TYPE setting.
#endif // CONFIG_INS_TYP

ERRORS:

APMrover2:212: error: new declaration 'uint8_t digitalRead(uint8_t)'
C:\Users\drewb1\Downloads\ArduPilot-Arduino-1.0.3-windows\ArduPilot-Arduino-1.0.3-windows\hardware\arduino\cores\arduino/Arduino.h:100: error: ambiguates old declaration 'int digitalRead(uint8_t)'
APMrover2:913: error: expected constructor, destructor, or type conversion before 'int’
APMrover2.pde: In function ‘int SKETCH_MAIN(int, char* const*)’:
APMrover2:913: error: ‘OK’ was not declared in this scope
compat.pde: In function ‘uint8_t digitalRead(uint8_t)’:
compat:33: error: new declaration 'uint8_t digitalRead(uint8_t)'
C:\Users\drewb1\Downloads\ArduPilot-Arduino-1.0.3-windows\ArduPilot-Arduino-1.0.3-windows\hardware\arduino\cores\arduino/Arduino.h:100: error: ambiguates old declaration ‘int digitalRead(uint8_t)’

Thanks,
Bernard :slight_smile:

@bdrew7,

Try following these instructions:

For those of you who want to compile and use the latest ArduRover V2.42 beta code, here is what you need to do:

  1. Download the ArduPilot version of the Arduino IDE 1.0.3 per th1s link code.google.com/p/ardupilot-meg … p&can=2&q=.
  2. Run the ArduPilot IDE 1.0.3 and, using “ArduPilot” in the header bar, select the correct HAL Board from the drop down menu. Then restart the ArduPilot IDE.
  3. Load in the latest V2.42 Sketch. The ArduRover Sketch code must reside in the same root directory as the ArduPilot IDE.
  4. There is no need to define your APM configuration anywhere in the ArduRover code. The HAL Board drop down menu will do it for you.
  5. Now run the compiler and you should have no problem with the compile. Don’t forget that the lastest ArduPilot libraries must be in the same Sketch folder as the ArduRover2 folder: ie ArduRover_v242_firmware/ArduRover2 and ArduRover_v230_firmware/libraries. Remember, ArduRover_v242_firmware must be in the same root directory as the ArduPilot IDE.
    Hope this helps.
    Regards,
    TCIII

Thanks for the instructions. Worked perfectly.

My getting into the code is necessitated by the need to add a different gps receiver.

My application will be using a HemisphereGPS V320 receiver (8 mm accuracy in 3 axis!!). If anyone else needs the code, let me know.

Thanks again,
Bernard