https://boneskull.com/how-to-use-an-esp8266-with-johnny-five/ にあるとおり
standardfirmata-wifiの中のdebugをアンコメント
(以後シリアルモニタで割り振られるIP確認のために必須)
wificonfig.hにあるssid,passphraseを自分の環境にあわせる
以上で通信ファームウエアがアップロードできた(Arduinio2.3必須!Arduino1.8ではだめ!)
例によってサンプルはそのままではうごかんので以下のように改変
'use strict';
const { EtherPortClient } = require('etherport-client');
const {Board, Led} = require('johnny-five');
const board = new Board({
port: new EtherPortClient({
host: '192.168.11.42', // 上記参照
port: 3030
}),
repl: false // LANだからかな
});
board.on('ready', () => {
const led= new Led(2);
led.blink(500);
});
0 件のコメント:
コメントを投稿