Help us understand the problem. What is going on with this article?

Mugbot のNode-RED化

More than 1 year has passed since last update.

東京都市大学 情報デザイン研究室の小池です。研究室でソーシャルロボットMugbot(マグボット)を開発しています。Node-RED User Group JapanのNode-RED Advent CalendarでMugbotのNode-RED化について書かせていただくことになりました。

ソーシャルロボット Mugbot

ロボットが人間社会に入ってきたときに、人間とロボットがどのように変わるのかを、実際にロボットを作って社会に投入して研究しています。
現在、Mugbotは東京都市大学の図書館や、東京都多摩市のシェアハウスなどで稼働しています。
Mugbotの情報は
www.mugbot.com
や、
https://www.facebook.com/SocialRobotics/
で公開しています。

IMG_6818.jpg

Mugbotには以下のような特長があります。

オープンソース

知的所有権に縛られずに誰も作れます。
情報やソフトは
www.mugbot.com
で公開しています。

低コスト

1万円台で製作できます。100円ショップの部品も一部使っています。

作りやすい

入手しやすい部品を使い、半田付けをしなくてもいい構造になっています。
接着剤も必要ありません。小学生も作っています。

OpenJTaikによる音声合成

OpenJTaikによって音声合成で話します。

Raspberry Piを使用

入手しやすいRaspberry Piを使っています。

IMG_1769.jpg

ユーザーが作って動かすロボット

最近は多くの家庭や職場で働くロボットが開発されていますが、ユーザーがロボットに何ができるのかを理解しないと何をさせたいのかのアイデアもでてきません。
Mugbotはユーザーが自分で作って自分の環境に合わせてMugbotを改造し、動かすことができます。ユーザーがMugbotを作って使うことによって、ロボットにさせたいことのアイデアもよりたくさんでてくるでしょう。

Mugbotの書籍

2016年にリックテレコムからMugbotの製作方法が書かれた本
おしゃべりロボット「マグボット」-ラズパイとArduinoで電子工作-
が発売されました。
(本書は重版予定はありません。現在流通しているもので販売終了だそうです。必要な方は以下からなどからお求めください。)
スクリーンショット 2018-12-24 16.44.06.png

Amazon
https://www.amazon.co.jp/dp/4865940189/ref=asc_df_48659401892554894/?tag=jpgo-22&creative=9303&creativeASIN=4865940189&linkCode=df0&hvadid=295700463796&hvpos=1o1&hvnetw=g&hvrand=8714289727164439985&hvpone=&hvptwo=&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=1009343&hvtargid=pla-524043784256&th=1&psc=1

スイッチサイエンス
https://www.switch-science.com/catalog/2732/?gclid=Cj0KCQiAgf3gBRDtARIsABgdL3nyK3H893GnxB650FOWwc8bC6gho7Xm1nqgLGFQmxKEwiAEJQ3Y1QgaAtX_EALw_wcB

千石電商
https://www.sengoku.co.jp/mod/sgk_cart/detail.php?code=EEHD-4XGK

書籍版のMugbotの構造

2016年の書籍発売当時のMugbotの構造は以下のようになっていました。
・Raspberry PiとArduinoを使用
・Raspberry Piからシリアル通信によってMugbotのLEDやサーボを制御
・Rubyを使ってWebSoketサーバーを経由してWebブラウザから操作インタフェースを制御
・SCRATCH1.4による専用ソフトを用意

これをNode-REDで動くように改修します。実は私の研究室のMugbotは2018年度はすべてNode-REDで動作しています。

Node-RED版Mugbot

MugbotをNode-RED化したことで以下のようなメリットがありました。
・Raspberry PiとArduinoを使っていましたがRaspberry Piのみを使用しています。
・理系ではない、研究室の学生も容易にプログラムできるようになりました。
・Mugbotに接続したセンサーも容易に扱えるようになりました。
・Node-RED上でを使って1台のPCから複数のMugbotを遠隔制御できるようになりました。
・将来は、遠隔地にあるMugbotも制御できるようにする予定です。

Node-REDによる変更

MugbotをNode-REDで動くようにするために以下のようにしました。

・Raspberry Pi上でNode-REDを使用する

Raspberry PiにインストールしたNode-REDを使用します。
Raspberry Pi上のNode-REDからRaspberry PiのGPIOを制御できます。
Raspberry Piの最新版はRaspberry Pi 3 Model B+です。

・ArduinoをなくしてRaspberry Piのみにする

これまでRaspberry PiとArduinoの2つのマイコンを使用していましたが、Raspberry Piだけで動くようにしました。

・Node-REDのdashboardで操作インタフェースを製作

Node-REDのノードのひとつであるdashboardによってMugbotの操作インタフェースを製作することにしました。

・RubyによるWebSocketを使用しない。

Rubyのソフトを使用しないですべてNode-REDで制御します。

Arduinoを無くした以外はMugbotの書籍をほぼ同じです。Mugbotのハードウェアの製作方法はMugbotの書籍を参考にしてください。

スクリーンショット 2018-12-24 16.53.33.png

Mugbotの外装部品の購入方法

Mugbotの書籍が発売されたときに、Mugbotの頭部の外装部品に使用していたマグカップが一時入手できなくなっていたのですが、その後入手できるようになりました。
以下から入手してください。
・頭部のマグカップ、把手のない別バージョンのカップ、胴体部のケース
千石電商
https://www.sengoku.co.jp/mod/sgk_cart/search.php?cid=5351

スイッチサイエンス
https://www.switch-science.com/catalog/list/?keyword=マグボット

Mugbotのハードウェアの変更

配線と、Arduinoを使用しないこと以外はMugbotの書籍と同じです。Mugbotのハードウェアの詳細な製作方法はMugbotの書籍を参照してください。

・配線の変更

書籍版ではMugbotのLEDやサーボはArduinoに接続されていましたが、Node-RED版ではすべてをRaspberry Piに接続します。サーボの5Vや、GNDはRaspberry PiのGPIOの5V、GNDであればどこでも構いません。

スクリーンショット 2018-12-24 18.14.40.png

・メス-メスのジャンプワイアの追加

書籍版ではMugbotでは、MugbotのLEDやサーボはArduinoに接続されていましたので終端はArduinoのメスのピンヘッダーでした。これがNode-RED版では終端はRaspberry Piのオスのピンヘッダーになりますので、新たにメス-メスのジャンプワイアを使って延長する必要があります。合計10本必要になります。

IMG_1768.jpg

音声合成システムのインストール

Mugbotで使用しているOpneJTalkを使って音声合成システムをインストールします。

OpneJTalk関連のソフトのインストール

Raspberry Piのターミナルから以下をpneJTalk関連のソフトをインストールします。
pi@raspberrypi ~$ sudo apt-get install open-jtalk
pi@raspberrypi ~$ sudo apt-get install open-jtalk-mecab-naist-jdic
pi@raspberrypi ~$ sudo apt-get install libhtsengine1  
pi@raspberrypi ~$ sudo apt-get install hts-voice-nitech-jp-atr503-m001

音声データのダウンロードとインストール

https://sourceforge.net/projects/mmdagent/files/MMDAgent_Example/からMMDAgent_Example-1.7.zip
をダウンロードして解凍します。
そしてフォルダ内にある
mei_happy.htsvoiceを/home/pi/
に移動してください。

・音声合成スクリプトのダウンロードとインストール

MugbotのGithubである
https://github.com/mugbot/Mugbot-System
にあるmugbot-talk-1.2.shをダウンロードして/home/pi/に移動します。
そしてターミミナルから実行権限を与えてください。

pi@raspberrypi ~$ chmod +x /home/pi/mugbot-talk-1.2.sh

ターミナルから
pi@raspberrypi ~$ /home/pi/mugbot-talk-1.2.sh 私はマグボットです

と入力してスピーカーから
「私はマグボットです」と話せば成功です。

Node-REDの準備

Raspberry Piの上で動くNode-REDを準備します。
(Raspberry PiのRaspbianOSのインストールや設定方法、Node-REDの基礎知識、操作方法については割愛します。)

NOOBSの最新版Version:3.0.0
や、Raspbian Stretch with desktop and recommended software Version:November 2018
では最初からNode-REDがイントールされています。

Node-REDのアップデート

インストールされているNode-REDは、ターミナルから
pi@raspberry:~ $ update-nodejs-and-nodered

によってNode-REDとnode.jsをアップデートします。

Node-REDの自動起動設定

Node-REDをRaspberry Piを電源を投入すると自動起動する設定にします。
ターミナルから以下を実行してください。
pi@raspberry:~ $ sudo systemctl enable nodered.service

pigpioを使用可能にする

Mugbotのサーボモーターを動かすためにRaspberry PiのソフトPWMのpigpioを使用可能にします。pigpioはすでにインストールされていますので、それを使えるようにします。
Raspberry Piのデスクトップのメニューの「設定」から「Raspberry Piの設定」を選んで「インターフェイス」のタブをクリックします。そして、「リモートGPIO:」のラジオボタンの「有効」を選択して、最後に「OK」ボタンをクリックします。

2018-12-29-185941_1280x1024_scrot.png

pigpioの自動起動設定をする

pigpioをRaspberry Piを電源を投入すると自動起動する設定にします。
ターミナルから以下を実行してください。
pi@raspberry:~ $ sudo systemctl enable pigpiod

最後にRaspberry Piの再起動をします。
pi@raspberry:~ $ sudo reboot

Node-REDの起動

Raspberry Piにモニターとキーボード、マウスを接続してRaspberry Piが起動したら
Raspberry Piのブラウザに以下を入力するとNode-REDが起動します。

Raspberry Piから直接起動

127.0.0.1:1880

スクリーンショット 2018-12-24 19.32.10.png

ネットにつながったPCから起動

Raspberry Piと家庭内ネットなどで繋がっているPCから、Raspberry PiのNode-REDを見ることができます。Raspberry PiのIPアドレスを知る必要があります。
Raspberry Piのターミナルから以下を入力するとIPアドレスを知ることができます。
pi@raspberry:~ $ hostname -I
(その他、ネット上にぶら下がっている機器のIPアドレスををPCから検索する方法もありますが、割愛します。)

Raspberry PiのIPは192.168.42.1であれば
PCのブラウザに以下を入力するとNode-REDを制御できます。
192.168.42.1:1880

Node-REDからMugbotを制御する

準備が整いましたので、MugbotをNode-REDで制御してみましょう

目の点灯

Mugbotの左目のLEDはGPIO19、右目はGPIO16に接続されています。
GPIOの制御にはrip gpioノードを使用します。
スクリーンショット 2018-12-24 19.12.36.png

スクリーンショット 2018-12-24 19.42.20.png

ip gpioノードは以下のように設定します。
スクリーンショット 2018-12-24 19.10.02.png

両目にtemplateノードから「1」を送ると点灯します。「0」を送ると消灯します。

音声合成

音声合成は、execノードからシェルスクリプトの
mugbot-talk-1.2.sh
を使い、
execノードの前のtemplateノードに書いた
「私はマグボットです」のテキストを引数として使用して
発話します。

スクリーンショット 2018-12-25 13.45.09.png

スクリーンショット 2018-12-24 18.49.18.png

スクリーンショット 2018-12-24 18.48.11.png
口のLEDは発話の開始前に点灯させ、会話が終了すると消灯させます。

口のLEDは「rpi gpio」ノードのGPIO26を使用しています。
スクリーンショット 2018-12-24 18.55.16.png

サーボの回転

Mugbotの首と目のサーボを制御できます。
サーボは「pi gpio」ノードで制御します。

スクリーンショット 2018-12-24 19.02.33.png

スクリーンショット 2018-12-24 18.59.42.png

「pi gpio」ノードもNode-REDでインストールする必要があります。
首のサーボはGPIO21に接続されています。
「pi gpio」ノードの設定は以下のようにします。
Mugbotのサーボは「RB90」を使用しています。
Type を「Serbo output」、
Limitsを「540-2450 uS」に設定しました。
使用するサーボで変更する必要があるかもしれません。

スクリーンショット 2018-12-24 18.56.54.png

「pi gpio」ノードを使って、首のサーボを「50」(0-180度の50%という意味で90度)
で制御できます。目のサーボは「40」です。(0-180度の40%という意味で72度)

Node-REDのデモデータ

以下は、MugbotのNode-REDのJSONデータです。
活用してください。本稿の最後にデモデータのJSONデータを置きました。

スクリーンショット 2018-12-24 18.38.57.png

dashboardによる操作インタフェース

Node-REDのノードであるdashboardを使用して
操作インタフェースを作ることができます。
dashboardを使用するにはdashboardノードをインストールする必要があります。

MugbotのIPアドレスが、
192.168.42.1であれば

http://192.168.42.1:1880/ui/#/0
で上記のデモデータによる操作インタフェースを見ることができます。
これはスマホのブラウザから見ることもできます。

スクリーンショット 2018-12-24 18.32.12.png

Shakebot

2017年からMugbotのサブセットの小型ロボット「Shakebot」を開発しています。
100円ショップの「シェイカー」を筐体にしてRaspberry Pi Zeroを使っています。
Mugbotと同じNode-REDのシステムで動きます。

この製作方法も今後
www.mugbot.com
でご紹介します。
IMG_1663.jpg
IMG_0698.jpg

今後の展望

そもそもMugbotのNode-RED化に踏み切った理由はWatsonを接続することでした。
今後はMugbotと会話できるようにします。

また、研究室のMugbotとShakebotはMQTTでメインのPCからブローカーを介して制御しています。この方法についても
www.mugbot.com
や、
https://www.facebook.com/SocialRobotics/
でご紹介できればと思います。

駆け足でしたが、MugbotのNode-RED化についてご紹介させていただきました。みなさんでMugbotを作って、実際の生活の中で使っていただけると幸いです。

JSONのデモデータ

[{"id":"150efef1.23da19","type":"exec","z":"2e3e4484.fa026c","command":"/home/pi/mugbot-talk-1.2.sh","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"音声合成","x":640,"y":280,"wires":[["fa765829.dc37c"],[],[]]},{"id":"abade62c.b3202","type":"rpi-gpio out","z":"2e3e4484.fa026c","name":"口LED","pin":"37","set":"","level":"0","freq":"","out":"out","x":930,"y":600,"wires":[]},{"id":"fe634d1a.1547d","type":"rpi-gpio out","z":"2e3e4484.fa026c","name":"口LED","pin":"37","set":"","level":"0","freq":"","out":"out","x":950,"y":340,"wires":[]},{"id":"b9f6db88.28dd68","type":"template","z":"2e3e4484.fa026c","name":"1","field":"payload","fieldType":"msg","format":"text","syntax":"plain","template":"1","output":"str","x":830,"y":340,"wires":[["fe634d1a.1547d"]]},{"id":"fa765829.dc37c","type":"template","z":"2e3e4484.fa026c","name":"0","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"0","output":"str","x":810,"y":260,"wires":[["8590e25d.15cbf"]]},{"id":"8590e25d.15cbf","type":"rpi-gpio out","z":"2e3e4484.fa026c","name":"口LED","pin":"37","set":"","level":"0","freq":"","out":"out","x":950,"y":260,"wires":[]},{"id":"7de92945.1489f8","type":"pi-gpiod out","z":"2e3e4484.fa026c","name":"目サーボ","host":"localhost","port":8888,"pin":"20","set":"","level":"0","out":"ser","sermin":"540","sermax":"2450","x":540,"y":480,"wires":[]},{"id":"b86bfd5c.0bbf","type":"template","z":"2e3e4484.fa026c","name":"35","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"35","output":"str","x":530,"y":400,"wires":[["7de92945.1489f8","5fe48798.03f82"]]},{"id":"dcb946a1.52e5a8","type":"pi-gpiod out","z":"2e3e4484.fa026c","name":"目サーボ","host":"localhost","port":8888,"pin":"20","set":"","level":"0","out":"ser","sermin":"540","sermax":"2450","x":880,"y":520,"wires":[]},{"id":"5900768a.6a343","type":"template","z":"2e3e4484.fa026c","name":"40","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"40","output":"str","x":690,"y":460,"wires":[["28dade99.61123a","e59b3993.f73bf"]]},{"id":"c02c977.cac3968","type":"rpi-gpio out","z":"2e3e4484.fa026c","name":"左目","pin":"35","set":"","level":"0","freq":"","out":"out","x":330,"y":40,"wires":[]},{"id":"5b3a8f63.a81f58","type":"rpi-gpio out","z":"2e3e4484.fa026c","name":"右目","pin":"36","set":"","level":"0","freq":"","out":"out","x":330,"y":80,"wires":[]},{"id":"5fe48798.03f82","type":"delay","z":"2e3e4484.fa026c","name":"300","pauseType":"delay","timeout":"300","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":670,"y":400,"wires":[["5900768a.6a343"]]},{"id":"37d38e75.e9fab2","type":"ui_slider","z":"2e3e4484.fa026c","name":"","label":"eyes","group":"38994330.9a55c4","order":0,"width":0,"height":0,"passthru":true,"topic":"","min":"30","max":"40","step":1,"x":130,"y":500,"wires":[["5fea255.1e4f5dc"]]},{"id":"5fea255.1e4f5dc","type":"pi-gpiod out","z":"2e3e4484.fa026c","name":"目サーボ","host":"localhost","port":8888,"pin":"20","set":"","level":"0","out":"ser","sermin":"540","sermax":"2450","x":320,"y":500,"wires":[]},{"id":"49136b7e.840d94","type":"ui_slider","z":"2e3e4484.fa026c","name":"","label":"head","group":"38994330.9a55c4","order":0,"width":0,"height":0,"passthru":true,"topic":"","min":0,"max":"100","step":1,"x":130,"y":560,"wires":[["b75896c9.312a58"]]},{"id":"b75896c9.312a58","type":"pi-gpiod out","z":"2e3e4484.fa026c","name":"首サーボ","host":"localhost","port":8888,"pin":"21","set":"","level":"0","out":"ser","sermin":"540","sermax":"2450","x":320,"y":560,"wires":[]},{"id":"2e89176b.9404e8","type":"ui_text_input","z":"2e3e4484.fa026c","name":"","label":"Voice","group":"38994330.9a55c4","order":0,"width":0,"height":0,"passthru":true,"mode":"text","delay":300,"topic":"","x":130,"y":420,"wires":[["150efef1.23da19","b86bfd5c.0bbf","64febfab.cbe6c"]]},{"id":"9a20942d.d11d7","type":"exec","z":"2e3e4484.fa026c","command":"/home/pi/mugbot-talk-1.2.sh","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"音声合成","x":660,"y":700,"wires":[["2b76cb98.acf66c"],[],[]]},{"id":"267fc689.af8792","type":"inject","z":"2e3e4484.fa026c","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":140,"y":100,"wires":[["c02c977.cac3968","5b3a8f63.a81f58","ec34f9ca.2f999","dd9f6a04.dc159"]]},{"id":"df93cb.70f14c38","type":"ui_button","z":"2e3e4484.fa026c","name":"","group":"38994330.9a55c4","order":0,"width":0,"height":0,"passthru":false,"label":"My name is Mugbot","color":"","bgcolor":"","icon":"","payload":"マイネームイズマグボット","payloadType":"str","topic":"","x":180,"y":640,"wires":[["9a20942d.d11d7","85a75217.0da4b8","b86bfd5c.0bbf","7cac8444.f1794c","343380a8.0e524"]]},{"id":"448e6b39.0d7a34","type":"ui_button","z":"2e3e4484.fa026c","name":"","group":"38994330.9a55c4","order":0,"width":0,"height":0,"passthru":false,"label":"東京都市大学の小池研究室で生まれました。","color":"","bgcolor":"","icon":"","payload":"東京都市大学の小池研究室で生まれました。","payloadType":"str","topic":"","x":250,"y":720,"wires":[["9a20942d.d11d7","85a75217.0da4b8","b86bfd5c.0bbf","343380a8.0e524"]]},{"id":"4a154bda.9d901c","type":"ui_button","z":"2e3e4484.fa026c","name":"","group":"38994330.9a55c4","order":0,"width":0,"height":0,"passthru":false,"label":"私の体は百円ショップの部品でできています。","color":"","bgcolor":"","icon":"","payload":"私の体は百円ショップの部品でできています。","payloadType":"str","topic":"","x":260,"y":800,"wires":[["9a20942d.d11d7","85a75217.0da4b8","b86bfd5c.0bbf","7cac8444.f1794c","343380a8.0e524"]]},{"id":"b5fcba76.7f3d1","type":"ui_button","z":"2e3e4484.fa026c","name":"","group":"38994330.9a55c4","order":0,"width":0,"height":0,"passthru":false,"label":"Laugh","color":"","bgcolor":"","icon":"","payload":"","payloadType":"str","topic":"","x":150,"y":960,"wires":[["7a4cca98.c323ac","4e5efd17.92e0ec"]]},{"id":"7a4cca98.c323ac","type":"template","z":"2e3e4484.fa026c","name":"30","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"30","output":"str","x":310,"y":960,"wires":[["766576a7.efc72","5e5cd5b7.d3ef74"]]},{"id":"766576a7.efc72","type":"pi-gpiod out","z":"2e3e4484.fa026c","name":"","host":"localhost","port":8888,"pin":"20","set":"","level":"0","out":"ser","sermin":"550","sermax":"2450","x":320,"y":1020,"wires":[]},{"id":"5e5cd5b7.d3ef74","type":"delay","z":"2e3e4484.fa026c","name":"","pauseType":"delay","timeout":"0.1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":490,"y":960,"wires":[["3969783d.038dd"]]},{"id":"3969783d.038dd","type":"template","z":"2e3e4484.fa026c","name":"40","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"40","output":"str","x":490,"y":1020,"wires":[["b5b62.fe2fa49e","562700de.382648"]]},{"id":"b5b62.fe2fa49e","type":"pi-gpiod out","z":"2e3e4484.fa026c","name":"","host":"localhost","port":8888,"pin":"20","set":"","level":"0","out":"ser","sermin":"550","sermax":"2450","x":480,"y":1080,"wires":[]},{"id":"e421e955.6d3408","type":"rpi-gpio out","z":"2e3e4484.fa026c","name":"","pin":"37","set":"","level":"0","freq":"","out":"out","x":140,"y":1100,"wires":[]},{"id":"562700de.382648","type":"delay","z":"2e3e4484.fa026c","name":"","pauseType":"delay","timeout":"0.1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":690,"y":960,"wires":[["2898f796.f113a"]]},{"id":"2898f796.f113a","type":"template","z":"2e3e4484.fa026c","name":"30","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"30","output":"str","x":690,"y":1020,"wires":[["41aefdce.4ed2e4","e5582c0c.3866"]]},{"id":"41aefdce.4ed2e4","type":"pi-gpiod out","z":"2e3e4484.fa026c","name":"","host":"localhost","port":8888,"pin":"20","set":"","level":"0","out":"ser","sermin":"550","sermax":"2450","x":680,"y":1080,"wires":[]},{"id":"e5582c0c.3866","type":"delay","z":"2e3e4484.fa026c","name":"","pauseType":"delay","timeout":"0.1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":890,"y":960,"wires":[["ddac1c5c.26fb1"]]},{"id":"ddac1c5c.26fb1","type":"template","z":"2e3e4484.fa026c","name":"40","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"40","output":"str","x":890,"y":1020,"wires":[["faa585b3.70c62","89a8e5c3.f7cf8"]]},{"id":"faa585b3.70c62","type":"pi-gpiod out","z":"2e3e4484.fa026c","name":"","host":"localhost","port":8888,"pin":"20","set":"","level":"0","out":"ser","sermin":"550","sermax":"2450","x":880,"y":1080,"wires":[]},{"id":"4e5efd17.92e0ec","type":"template","z":"2e3e4484.fa026c","name":"1","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"1","output":"str","x":130,"y":1040,"wires":[["e421e955.6d3408"]]},{"id":"89a8e5c3.f7cf8","type":"delay","z":"2e3e4484.fa026c","name":"","pauseType":"delay","timeout":"0.1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1090,"y":960,"wires":[["6ad9d4ea.75077c"]]},{"id":"6ad9d4ea.75077c","type":"template","z":"2e3e4484.fa026c","name":"30","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"30","output":"str","x":1070,"y":1020,"wires":[["425042e4.e9aa5c","eb18ac7d.8e5308"]]},{"id":"425042e4.e9aa5c","type":"pi-gpiod out","z":"2e3e4484.fa026c","name":"","host":"localhost","port":8888,"pin":"20","set":"","level":"0","out":"ser","sermin":"550","sermax":"2450","x":1080,"y":1080,"wires":[]},{"id":"eb18ac7d.8e5308","type":"delay","z":"2e3e4484.fa026c","name":"","pauseType":"delay","timeout":"0.1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1310,"y":960,"wires":[["b4c025e1.7d45e8"]]},{"id":"b4c025e1.7d45e8","type":"template","z":"2e3e4484.fa026c","name":"40","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"40","output":"str","x":1310,"y":1020,"wires":[["8a443c47.9b102","ecc7c7d7.f98d"]]},{"id":"8a443c47.9b102","type":"pi-gpiod out","z":"2e3e4484.fa026c","name":"","host":"localhost","port":8888,"pin":"20","set":"","level":"0","out":"ser","sermin":"550","sermax":"2450","x":1320,"y":1080,"wires":[]},{"id":"ecc7c7d7.f98d","type":"delay","z":"2e3e4484.fa026c","name":"","pauseType":"delay","timeout":"0.1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":170,"y":1220,"wires":[["21074e1f.a0b1fa"]]},{"id":"85a75217.0da4b8","type":"template","z":"2e3e4484.fa026c","name":"1","field":"payload","fieldType":"msg","format":"text","syntax":"plain","template":"1","output":"str","x":650,"y":600,"wires":[["e30adfdd.2ad7"]]},{"id":"bce2afde.a0cb08","type":"rpi-gpio out","z":"2e3e4484.fa026c","name":"口LED","pin":"37","set":"","level":"0","freq":"","out":"out","x":930,"y":700,"wires":[]},{"id":"2b76cb98.acf66c","type":"template","z":"2e3e4484.fa026c","name":"0","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"0","output":"str","x":790,"y":700,"wires":[["bce2afde.a0cb08"]]},{"id":"28dade99.61123a","type":"delay","z":"2e3e4484.fa026c","name":"300","pauseType":"delay","timeout":"300","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":870,"y":400,"wires":[["619d6f3c.d7cee"]]},{"id":"619d6f3c.d7cee","type":"template","z":"2e3e4484.fa026c","name":"35","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"35","output":"str","x":870,"y":460,"wires":[["dcb946a1.52e5a8","cc7a5e04.ebf8c"]]},{"id":"e59b3993.f73bf","type":"pi-gpiod out","z":"2e3e4484.fa026c","name":"目サーボ","host":"localhost","port":8888,"pin":"20","set":"","level":"0","out":"ser","sermin":"540","sermax":"2450","x":700,"y":520,"wires":[]},{"id":"f149d35e.045f7","type":"pi-gpiod out","z":"2e3e4484.fa026c","name":"目サーボ","host":"localhost","port":8888,"pin":"20","set":"","level":"0","out":"ser","sermin":"540","sermax":"2450","x":1240,"y":520,"wires":[]},{"id":"79e6a53f.e9e8e4","type":"template","z":"2e3e4484.fa026c","name":"40","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"40","output":"str","x":1050,"y":460,"wires":[["f5de477a.96d6","63596670.7579e8"]]},{"id":"cc7a5e04.ebf8c","type":"delay","z":"2e3e4484.fa026c","name":"300","pauseType":"delay","timeout":"300","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1050,"y":400,"wires":[["79e6a53f.e9e8e4"]]},{"id":"f5de477a.96d6","type":"delay","z":"2e3e4484.fa026c","name":"300","pauseType":"delay","timeout":"300","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1230,"y":400,"wires":[["2653fbb4.648864"]]},{"id":"2653fbb4.648864","type":"template","z":"2e3e4484.fa026c","name":"35","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"35","output":"str","x":1250,"y":460,"wires":[["f149d35e.045f7","4b248fbf.682498"]]},{"id":"63596670.7579e8","type":"pi-gpiod out","z":"2e3e4484.fa026c","name":"目サーボ","host":"localhost","port":8888,"pin":"20","set":"","level":"0","out":"ser","sermin":"540","sermax":"2450","x":1060,"y":520,"wires":[]},{"id":"1b2c46a5.1ee891","type":"template","z":"2e3e4484.fa026c","name":"60","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"60","output":"str","x":1590,"y":480,"wires":[["11530f93.05707","3f514913.c698d6"]]},{"id":"7fd8e667.4c4d08","type":"delay","z":"2e3e4484.fa026c","name":"300","pauseType":"delay","timeout":"300","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1570,"y":400,"wires":[["1b2c46a5.1ee891"]]},{"id":"11530f93.05707","type":"delay","z":"2e3e4484.fa026c","name":"300","pauseType":"delay","timeout":"300","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1750,"y":400,"wires":[["360f7240.55fafe"]]},{"id":"360f7240.55fafe","type":"template","z":"2e3e4484.fa026c","name":"40","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"40","output":"str","x":1770,"y":480,"wires":[["a26dd9b9.521c9","be19e3a3.740a"]]},{"id":"ac1852e4.8c27b","type":"pi-gpiod out","z":"2e3e4484.fa026c","name":"首サーボ","host":"localhost","port":8888,"pin":"21","set":"","level":"0","out":"ser","sermin":"540","sermax":"2450","x":1440,"y":480,"wires":[]},{"id":"3f514913.c698d6","type":"pi-gpiod out","z":"2e3e4484.fa026c","name":"首サーボ","host":"localhost","port":8888,"pin":"21","set":"","level":"0","out":"ser","sermin":"540","sermax":"2450","x":1600,"y":560,"wires":[]},{"id":"a26dd9b9.521c9","type":"pi-gpiod out","z":"2e3e4484.fa026c","name":"首サーボ","host":"localhost","port":8888,"pin":"21","set":"","level":"0","out":"ser","sermin":"540","sermax":"2450","x":1760,"y":560,"wires":[]},{"id":"be19e3a3.740a","type":"delay","z":"2e3e4484.fa026c","name":"300","pauseType":"delay","timeout":"300","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1930,"y":400,"wires":[["354bd64c.84e85a"]]},{"id":"ec34f9ca.2f999","type":"template","z":"2e3e4484.fa026c","name":"50","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"50","output":"str","x":330,"y":140,"wires":[["fc896c88.81566"]]},{"id":"fc896c88.81566","type":"pi-gpiod out","z":"2e3e4484.fa026c","name":"首サーボ","host":"localhost","port":8888,"pin":"21","set":"","level":"0","out":"ser","sermin":"540","sermax":"2450","x":480,"y":140,"wires":[]},{"id":"dd9f6a04.dc159","type":"template","z":"2e3e4484.fa026c","name":"40","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"40","output":"str","x":330,"y":200,"wires":[["24796e20.f8a76a"]]},{"id":"24796e20.f8a76a","type":"pi-gpiod out","z":"2e3e4484.fa026c","name":"目サーボ","host":"localhost","port":8888,"pin":"20","set":"","level":"0","out":"ser","sermin":"540","sermax":"2450","x":480,"y":200,"wires":[]},{"id":"4b248fbf.682498","type":"template","z":"2e3e4484.fa026c","name":"50","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"50","output":"str","x":1410,"y":400,"wires":[["7fd8e667.4c4d08","ac1852e4.8c27b"]]},{"id":"354bd64c.84e85a","type":"template","z":"2e3e4484.fa026c","name":"60","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"60","output":"str","x":1950,"y":480,"wires":[["898fec57.6541c","7ca770b5.7f1db8"]]},{"id":"898fec57.6541c","type":"pi-gpiod out","z":"2e3e4484.fa026c","name":"首サーボ","host":"localhost","port":8888,"pin":"21","set":"","level":"0","out":"ser","sermin":"540","sermax":"2450","x":1960,"y":560,"wires":[]},{"id":"7ca770b5.7f1db8","type":"delay","z":"2e3e4484.fa026c","name":"300","pauseType":"delay","timeout":"300","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":2110,"y":400,"wires":[["43e650b6.805ef"]]},{"id":"43e650b6.805ef","type":"template","z":"2e3e4484.fa026c","name":"50","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"50","output":"str","x":2130,"y":480,"wires":[["f56f1df2.a197a8"]]},{"id":"f56f1df2.a197a8","type":"pi-gpiod out","z":"2e3e4484.fa026c","name":"首サーボ","host":"localhost","port":8888,"pin":"21","set":"","level":"0","out":"ser","sermin":"540","sermax":"2450","x":2160,"y":560,"wires":[]},{"id":"7cac8444.f1794c","type":"template","z":"2e3e4484.fa026c","name":"50","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"50","output":"str","x":670,"y":780,"wires":[["a72cbbfb.8a7008"]]},{"id":"a72cbbfb.8a7008","type":"pi-gpiod out","z":"2e3e4484.fa026c","name":"首サーボ","host":"localhost","port":8888,"pin":"21","set":"","level":"0","out":"ser","sermin":"540","sermax":"2450","x":820,"y":780,"wires":[]},{"id":"343380a8.0e524","type":"template","z":"2e3e4484.fa026c","name":"40","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"40","output":"str","x":670,"y":860,"wires":[["de500307.22f05"]]},{"id":"de500307.22f05","type":"pi-gpiod out","z":"2e3e4484.fa026c","name":"目サーボ","host":"localhost","port":8888,"pin":"20","set":"","level":"0","out":"ser","sermin":"540","sermax":"2450","x":800,"y":860,"wires":[]},{"id":"21074e1f.a0b1fa","type":"template","z":"2e3e4484.fa026c","name":"30","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"30","output":"str","x":150,"y":1300,"wires":[["2c72ba20.e372ce","f812b2.f3101d5"]]},{"id":"2c72ba20.e372ce","type":"pi-gpiod out","z":"2e3e4484.fa026c","name":"","host":"localhost","port":8888,"pin":"20","set":"","level":"0","out":"ser","sermin":"550","sermax":"2450","x":160,"y":1380,"wires":[]},{"id":"f812b2.f3101d5","type":"delay","z":"2e3e4484.fa026c","name":"","pauseType":"delay","timeout":"0.1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":350,"y":1220,"wires":[["b01f0083.8b31f"]]},{"id":"b01f0083.8b31f","type":"template","z":"2e3e4484.fa026c","name":"40","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"40","output":"str","x":350,"y":1280,"wires":[["547b8ea4.da5e","e35cdd3b.c6d3b"]]},{"id":"547b8ea4.da5e","type":"pi-gpiod out","z":"2e3e4484.fa026c","name":"","host":"localhost","port":8888,"pin":"20","set":"","level":"0","out":"ser","sermin":"550","sermax":"2450","x":340,"y":1360,"wires":[]},{"id":"e35cdd3b.c6d3b","type":"delay","z":"2e3e4484.fa026c","name":"","pauseType":"delay","timeout":"0.1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":570,"y":1220,"wires":[["c0574e1b.189998"]]},{"id":"c0574e1b.189998","type":"template","z":"2e3e4484.fa026c","name":"30","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"30","output":"str","x":550,"y":1300,"wires":[["d971875c.60005","863301e3.94fe88"]]},{"id":"d971875c.60005","type":"pi-gpiod out","z":"2e3e4484.fa026c","name":"","host":"localhost","port":8888,"pin":"20","set":"","level":"0","out":"ser","sermin":"550","sermax":"2450","x":540,"y":1360,"wires":[]},{"id":"863301e3.94fe88","type":"delay","z":"2e3e4484.fa026c","name":"","pauseType":"delay","timeout":"0.1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":790,"y":1220,"wires":[["912a1b84.2afac"]]},{"id":"912a1b84.2afac","type":"template","z":"2e3e4484.fa026c","name":"40","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"40","output":"str","x":790,"y":1300,"wires":[["34257cf0.720424","1fae330b.5546ad"]]},{"id":"34257cf0.720424","type":"pi-gpiod out","z":"2e3e4484.fa026c","name":"","host":"localhost","port":8888,"pin":"20","set":"","level":"0","out":"ser","sermin":"550","sermax":"2450","x":800,"y":1360,"wires":[]},{"id":"dc6300b7.ab8b6","type":"template","z":"2e3e4484.fa026c","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"0","output":"str","x":1660,"y":1220,"wires":[["e00b8129.9dfa68"]]},{"id":"e00b8129.9dfa68","type":"rpi-gpio out","z":"2e3e4484.fa026c","name":"","pin":"37","set":"","level":"0","freq":"","out":"out","x":1620,"y":1320,"wires":[]},{"id":"1fae330b.5546ad","type":"delay","z":"2e3e4484.fa026c","name":"","pauseType":"delay","timeout":"0.1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":990,"y":1220,"wires":[["6dad372f.7abdc8"]]},{"id":"6dad372f.7abdc8","type":"template","z":"2e3e4484.fa026c","name":"30","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"30","output":"str","x":990,"y":1300,"wires":[["ef8be4c5.6ff9b","1856c718.40f181"]]},{"id":"ef8be4c5.6ff9b","type":"pi-gpiod out","z":"2e3e4484.fa026c","name":"","host":"localhost","port":8888,"pin":"20","set":"","level":"0","out":"ser","sermin":"550","sermax":"2450","x":1000,"y":1360,"wires":[]},{"id":"1856c718.40f181","type":"delay","z":"2e3e4484.fa026c","name":"","pauseType":"delay","timeout":"0.1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1210,"y":1220,"wires":[["cb80a2cc.52ce3"]]},{"id":"cb80a2cc.52ce3","type":"template","z":"2e3e4484.fa026c","name":"40","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"40","output":"str","x":1190,"y":1300,"wires":[["26b92103.678ea6","644ead58.737f8c"]]},{"id":"26b92103.678ea6","type":"pi-gpiod out","z":"2e3e4484.fa026c","name":"","host":"localhost","port":8888,"pin":"20","set":"","level":"0","out":"ser","sermin":"550","sermax":"2450","x":1200,"y":1360,"wires":[]},{"id":"644ead58.737f8c","type":"delay","z":"2e3e4484.fa026c","name":"","pauseType":"delay","timeout":"0.1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1430,"y":1220,"wires":[["bf4a5767.c21c78"]]},{"id":"bf4a5767.c21c78","type":"template","z":"2e3e4484.fa026c","name":"30","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"30","output":"str","x":1410,"y":1320,"wires":[["70b8f414.15d414","dc6300b7.ab8b6"]]},{"id":"70b8f414.15d414","type":"pi-gpiod out","z":"2e3e4484.fa026c","name":"","host":"localhost","port":8888,"pin":"20","set":"","level":"0","out":"ser","sermin":"550","sermax":"2450","x":1420,"y":1380,"wires":[]},{"id":"64febfab.cbe6c","type":"delay","z":"2e3e4484.fa026c","name":"300","pauseType":"delay","timeout":"300","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":630,"y":340,"wires":[["b9f6db88.28dd68"]]},{"id":"e30adfdd.2ad7","type":"delay","z":"2e3e4484.fa026c","name":"300","pauseType":"delay","timeout":"300","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":790,"y":600,"wires":[["abade62c.b3202"]]},{"id":"38994330.9a55c4","type":"ui_group","z":"","name":"Control","tab":"496771d5.b2ebe8","order":1,"disp":true,"width":"6","collapse":false},{"id":"496771d5.b2ebe8","type":"ui_tab","z":"","name":"Mugtbot","icon":"dashboard","order":2}]

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした