Arduino core liberaries are not accessable????

Hello,I want to use the functions digitalWrite() and analogWrite() which have been defined in the arduino core liberaries. But the problem is that once code is compiled the modified compiler of arduino for ardupilot excludes these core liberaries from the include path and gives me the display likeBuilding for ArduPilot Mega 2.xExcluding arduino core from include pathsExcluding arduino core from linkCan't I access these functions. Kindly someone help me out......... I'm totally stuck at this moment..........

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Developer

    Hi.  digitalWrite is a call to an arduino library.  Try this article

    http://stackoverflow.com/questions/13260508/using-the-arduino-libra...

    In ardupilot we deliberately exclude arduino as we no longer use it.  I'm not sure what your trying to do but its probably better if you figure out how to do it using the ardupilot mechanisms rather then try and put the arduino support back in.

    Thanks, Grant

    •   @Grant, I know that these arduino libraries are excluded but I want to know that if we have to access any function like pinMode(), digtalWrite(),or anologWrite()  which have been defined in the arduino core then how can we access them. Basically I am trying to give an  automatic input at elevator pin for which i need to use these functions.

        

         Someone told me about Makefile, but I have never used it.  Is there any other way to access these functions.

      Thanks, Anis.

  • Developer

    Anis, i am afraid that you cannot use those commands. APM codebase is not using original Arduino libraries anymore as they are just way too bulky and slow. All those functions have been replaced and you should use their replacement functions or you might crash whole system.

    For examples look AP.RC etc libraries.

    Jani / jDrones

    jD-main
    •  

       @Jani, Sorry I could not find replacements for the functions like pinMode(),digitalWrite() etc., would you kindly guide me in a bit more detail about their replacement functions and how to access them.

      Thanks,Anis.

  •   I would like to add that code is compiled successfully if these functions are commented and gives errors once comment is removed

          

    ArduPlane:1390: error: 'digitalWrite' was not declared in this scope

       So the basic problem identified by me is that this function is not accessed due to the exclusion of arduino core from the include path.......

     Does someone know how to access arduino core(include in the path) or is there any other way to sort it out???

This reply was deleted.