How to access arduino liberaries in APM code?

Hello,

I’m using “ArduPilot-Arduino-1.0.3-windows” which has been modified for Ardupilot code. In this version of the compiler arduino core libraries are deliberately excluded.

I want to use some functions like pinMode(), digitalWrite() etc., but due to the exclusion of these libraries I’m unable to use these functions in my code.

Can some one PLEASE help me out how to use these functions?? I'm totally stuck  on this point. I have used arduino IDE 1.0.6 and many other versions which were downloaded from Arduino's official Website which access to these functions but do not execute the code and give lots of errors.

Thank You in advance…

You should use AP_HAL::HAL::gpio to access the GPIOs instead of pinMode, etc.

You can build ArduPilot using a generic Arduino distribution, I do that (with a patch to support less ancient Arduino versions) but if you include the Arduino standard libraries they are likely to conflict with the HAL anyway.