LoginSignup
7
6

More than 5 years have passed since last update.

Raspberry PiでArduino IDE BETAの使い方

Last updated at Posted at 2015-04-24

最近2も出て盛んなRaspberry Pi。あれこれDIYに便利ですよね。ところで、1ボードマイコンつながりでArduinoも便利ですよね。するとArduino IDEをRaspbeerry Piで使いたくなると思います。
しかし、Debianにおける現在のArduino IDEのパッケージ提供はバージョン1.0.1のみです。

追記:2016/10現在のjessieレポジトリでも1.0.5

また、公式から提供されるビルド済みArduinoはx86 or amd64向けのみで、ARM CoreをつんだRaspberryではそのまま使うことができません。
つまり、Arduino IDEのバグを見つけても解決できません。
それどころか、Arduino Dueのような最新のボードを利用することもできません。
そこで本稿では、Raspberry PiでArduino IDE BETAバージョンを使う方法を記します。

この記事ではバージョン1.5.6-r2BETAを対象とします。
他バージョンを使おうとしている人の手助けになれば幸いです。

  1. Arduino IDE(ビルド済み版)のダウンロード
    欲しいバージョンのLinux32bit向けビルド済み版をダウンロードし、展開します。

  2. 必要なパッケージのインストール
    rasbianの現在の標準であるwheezyではなく、テスト中のjessieを利用します。
    本稿では両レポジトリを使用する手段を使いますが、jessieにアップグレードしてしまっても構いません。

    1. JAVAランタイムのインストール
    2. jessieレポジトリを追加し、wheezyのほうを優先設定にする
  3. Arduino IDEの設定を書き換える

    • ref: http://make.kosakalab.com/arduino/raspberry_pi/index.html
    • Arduino IDEの起動に必要なライブラリを整える
      • $ cd [arduino-dir]/lib
      • $ cd libastylej.so libastylej.so.old
      • $ ln -s /usr/lib/jni/libastylej.so ./
    • avrコンパイラの設定を変更する
      • $ cd [arduino-dir]/hardware/arduino/avr/
      • 'platform.txt'を以下のように編集する
    • armコンパイラの設定を変更する
      • $ cd [arduino-dir]/hardware/arduino/sam/
      • 'platform.txt'を以下のように編集する

    追記:Arduino IDEのバージョンが上がり、保存先が変更になりました
    ~/.arduino15/packages/arduino/hardware/sam/[version]/platform.txt

  4. 2-2にてアンインストールされたものに必要なものがあれば再インストールする

    • apt-get -t jessie install [package]とオプションをつけてjessie版インストールを試みましょう
hardware/arduino/avr/platform.txt
- compiler.path={ide.path}/tools/avr/bin/..
+ compiler.path=/usr/bin/
hardware/arduino/avr/platform.txt
- 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
hardware/arduino/sam/platform.txt
- compiler.path={runtime.ide.path}/hardware/tools
+ compiler.path=/usr/bin/
hardware/arduino/sam/platform.txt
- tools.bossac.path={runtime.ide.path}/hardware/tools
+ tools.bossac.path=/usr/bin/

Arduino開発者の手助けになれば幸いです。

7
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
6