Intel EdisonのGetting startedその2.(Arduino IDEからの転送,Edison初期設定)
Getting Started Edison
このエントリは以下の2つの事項について説明します.
これも公式の訳+アルファです.
- 購入してからファームウェアを更新していない場合は,1つ前のエントリを参考にしてファームウェアの更新を行ってください.
step 1. Connectiong Edison
- 箱から出したedisonをボードに接続する.順番としては前回エントリのファームウェア更新よりも前ですね〜
step 2. Download Edison Arduino IDE
step 2-1. Edison 用Arduino IDEのインストール
step 2-2. テストとしてBlinkプログラムをEdisonへ書き込む
HWでのHello, World!であるBlink(LED点滅)プログラムを書き込みます.
- Arduino IDEを起動して,File -> Examples -> Basics -> Blink を開く
- Tools -> Board で”Intel Edison”を選択
Tools -> Serial Portで,”/dev/cu.usbmodemxxxx”を選択
- xxxx部分は各環境により異なります.
- ttyではなくcuのものを選択します.
IDE左上のチェックマークのアイコンをクリックしてビルドする
チェックマークアイコンの隣の矢印アイコンを押してEdisonへプログラムを転送する
- No, such file or directory というエラーが出たら指定しているSerial Portが間違っているので,3に戻ってSerial Portの選択を行います
Arduinoボード上のLEDが点滅すればOKです.
- Break out boardの場合は該当するGPIOにLEDつないで確認するのかな?未確認です!
Step 4. 初期設定(デバイス名,SSID名,パスワード,Wifi設定)
- edisonの設定を行うために,”configure_edison”というコマンドが提供されている.さらに,setupオプションを付けることで初期設定を一括でできる.
# 初期設定の実施 # configure_edison --setup # これで実行される設定は以下の3つ. # 1. デバイス名の設定.これはSSIDとしても利用されるようです. # 2. rootパスワードの設定.これはSSIDパスワードとしても利用されるようです. # 3. WiFiの設定.初回は失敗したけど,2回目でAPが見えるようになりました. # 最後に表示されるIPかURLを使ってブラウザからアクセスするとEdisonに関する情報が確認できます. # 各設定で間違えたら,以下の補足にあるようにconfigure_edisonコマンドのオプションを変えて実行しましょう.
補足
ちなみに,”configure_edison”コマンドのオプションは以下のようになっている.
# configure_edison --help usage: configure_edison [-h] [--server] [[--setup | --name | --password | --wifi] [--showWiFiIP | --version | --latest-version | --upgrade | --disableOneTimeSetup | --enableOneTimeSetup | --flash <version> [<release name> ...] | --showNames] optional arguments: -h, --help show this help message and exit --server Starts the server (testing only) --setup Goes through changing the device name, password, and wifi options --name Changes the device name --password Changes the device password --wifi Changes the wifi options --showWiFiIP IP address associated with the wireless interface --version Gets the current firmware version --latest-version Gets the latest firmware version --upgrade Downloads the latest firmware --disableOneTimeSetup Disable one-time setup and WiFi access point --enableOneTimeSetup Enable one-time setup and WiFi access point --flash <version> [<release name> ...] Downloads and flashes an image --showNames Show device name and SSID
wifi接続先を追加するときとか,Edisonの名前(SSID)変えたい時とかも使えますね.
例えばwifiの設定変更なら以下のようになります
# configure_edison --wifi