Arduino Installation on Raspberry PI 2B Running Arch Linux

Posted by:

Official Arduino IDE does not agree with PI and it sucks any way.

[update] Platformio is a better way!

There are two major ways to compile and upload sketch files to Arduino: a. use IDEs (Arduino IDE, Emacs IDE, Fritzing or ArduIDE). or b. use a terminal. Arch official site explains well, however, most of it does not apply to RasPi with Arch Linux. It DOES work with regular Arch system. You can skip this section if you are using RasPI.

  1. update Arch-pi and install whatever dependencies for Arduino, mine needed 3 and 4.

  2. arudio compile dependency
  3. libtinfo
  4. fakeroot

  5. install arduino IDE 1.6.4 – NOT working built on a Raspberry Pi by adding ‘armv6h’ to the arch=(‘i686’ ‘x86_64’) line like so arch=(‘i686’ ‘x86_64’ ‘armv7h’) in the PKGBUILD

    Also, update replace x86-64 in the following lines with armv7h, after that it can be compiled with makepkg -s build and installed ok, but the IDE program has terminated prematurely with following error:

    Possible workaround here, I will stick with the solution below.

  6. Install Python and related package

  7. install arduino10 -same compile issue,
  8. Download and unzip arduino-cmake

  9. Make proj folder with “build” folder and CMakeLists.txt
  10. CMakeLists.txt file update path and board info, fail to compile

The only way working for RasPI I figured out so far is to use arduino-mk with terminal or Emacs detailed in next section.

There are useful links: arduino-mk instruction arch AUR

  1. install arduino-SDK older version, compile for armv7h and install -only working versin of arduino is this version – 1:1.5.8-4. Note: add this line arch=(‘i686’ ‘x86_64’ ‘armv7h’) to PKGBUILD file to compile, and install with following line. (please note: I discovered that arduino10 will compile, but does not work with arduino-mk).

  2. compile arduino-mk and install

  3. make project directory

  4. Create Makefile for arduino >1.5 in the same folder with your ino sketch file

  5. compile and upload

  6. Other line command make – no upload make upload – compile and upload make clean – remove all our dependencies make depends – update dependencies make reset – reset the Arduino by tickling DTR on the serial port make raw_upload – upload without first resetting make show_boards – list all the boards defined in boards.txt
  7. Tag name is essential (uno and mega2560) tag in step 4

Emacs IDE for arduino (with arduino-beta 1.6.1 installed)

  1. install arduino-mk if you did not already.

  2. Get arduino-mode and CEDET if you do not have it
  3. update your dot-emacs file

  4. copy Makefile into sketch folder, this is a example working file:

  5. M-x compile make upload.

    scr_emacs_arduino.png

  6. or, directly from terminal

  7. Note, if you encouter following error,

    see rational here https://www.arduino.cc/en/Tutorial/Variables and, move the function upwards until the error messages disappears. Arduino IDE tolerate this though.

0

Add a Comment