Skip to content

Instantly share code, notes, and snippets.

@yonta
Created April 24, 2015 10:29
Show Gist options
  • Save yonta/5fbdd7c64adec5362e56 to your computer and use it in GitHub Desktop.
Save yonta/5fbdd7c64adec5362e56 to your computer and use it in GitHub Desktop.
How to use Arduino IDE in Raspberry Pi 2
How to use Arduino IDE 1.5.6-r2 in Raspberry Pi 2
---------------------------------------------------
written by Keita SAITOU in 2015/04/24
1. Getting Arduino IDE
* http://www.arduino.cc/en/Main/Software
* previous release -> Arduino 1.5.6-r2 BETA -> Linux 32bit
* decompressin by `tar xzf arduino1.5.6-r2.tar.gz`
2. Install needed packages
* gettting below packages by apt-get or aptitude
* ref: http://playground.arduino.cc/learning/linux
* command: apt-get install oracle-java8-jdk
* package: oracle-java8-sdk (or, later version than openjdk-6-jre)
* adding jessie repository with wheezy
* ref: https://nicohood.wordpress.com/2015/01/24/installing-avr-gcc-4-8-1-and-arduino-ide-1-6-on-raspberry-pi/
* doing to step2, and install below packages in jessie
* command: apt-get -t jessie install [package]
* gcc-avr avrdude avr-libc libjssc-java libastylej-jni bossa-cli
3. Rewrite Arduino IDE and Tool settings
* ref: http://make.kosakalab.com/arduino/raspberry_pi/index.html
* rewrite Arduino IDE settings
* command:
* `$ cd [arduino-dir]/lib`
* `$ cd libastylej.so libastylej.so.old`
* `$ ln -s /usr/lib/jni/libastylej.so ./`
* rewrite avr compiler
* command:
* `$ cd [arduino-dir]/hardware/arduino/avr/`
* edit 'platform.txt'
* compiler path
* #compiler.path={ide.path}/tools/avr/bin/..
* compiler.path=/usr/bin/
* upload tool path
* # tools.avrdude.config.path.linux={runtime.ide.path}/hardware/tools/avrdude.conf
* # tools.avrdude.cmd.path={runtime.ide.path}/hardware/tools/avr/bin/avrdude
* # tools.avrdude.cmd.path.linux={runtime.ide.path}/hardware/tools/avrdude
* # tools.avrdude.config.path.linux={runtime.ide.path}/hardware/tools/avrdude.conf
* tools.avrdude.config.path=/etc/avrdude.conf
* tools.avrdude.cmd.path=/usr/bin/avrdude
* tools.avrdude.cmd.path.linux=/usr/bin/avrdude
* tools.avrdude.config.path.linux=/etc/avrdude.conf
* rewrite avr compiler
* command:
* `$ cd [arduino-dir]/hardware/arduino/sam/`
* edit 'platform.txt'
* compiler path
* # compiler.path={runtime.ide.path}/hardware/tools/g++_arm_none_eabi/bin/
* compiler.path=/usr/bin/
* upload tool path
* # tools.bossac.path={runtime.ide.path}/hardware/tools
* tools.bossac.path=/usr/bin
4. Reinstall auto removed package (If you need...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment