Given the popularity of the Arduino IDE and the wealth of existing Arduino sketches, can I use the Arduino IDE to write or compile sketches that will run on the Raspberry Pi?

  • Why would you want to do this? Sure, many Arduino sketches could be compiled to run on the Pi, but many more would not because of the differences in hardware.
    – Milliways
    Feb 3, 2016 at 3:25
  • The interesting thing is that, so far, we have found very few sketches that a actually don't work and in most cases, these highlight areas where the PiDuino library that provides an implementation of the Arduino library on the Pi hadn't gotten it right. Obviously any sketches that assume that they are running on ATmel processors or try be super efficient by poking Arduino registers and memory won't work ... but these appear to be the exception rather than the rule. Other than that, the premise can be that if one learns Arduino APIs ... why not use them?
    – Kolban
    Feb 3, 2016 at 5:16

1 Answer 1


Yes you can compile programs on the Arduino IDE on Windows or Linux and the resulting executables can run directly on the Raspberry Pi. In order to achieve this there are a few steps to follow including installing the Arduino IDE, downloading a tool chain and, most importantly, installing the Github project found here:


A tutorial video illustrating the installation steps can be found here:


A tutorial video illustrating how to publish directly to the Pi from the Arduino IDE can be found here:


See also:

Disclaimer: Please note that I am a contributor to this Github project. If this post is believed to be considered "advertizing" we'll be glad to remove it. It is felt though that since this is an Open Source project and no similar projects can be found and the topic of Arduino compilation for Pi "feels" relevant ... we honestly believe it to be appropriate. However, if deemed not to be, we will remove this Q&A immediately upon request.

  • If you are the developer me-no-dev or a contributor to the above mentioned project that should be clearly disclosed. Feb 3, 2016 at 1:09
  • Thanks Steve .. have added a disclaimer/disclosure ... hopefully this is a useful Q&A in the Pi Community stack exchange but if not, we will be delighted to remove it immediately upon request.
    – Kolban
    Feb 3, 2016 at 1:21
  • 1
    The point is not to prevent you from advertising your project here. The disclaimer is needed so that people know your opinion of the project may be biased, that's all. Mar 7, 2017 at 13:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.