Introduction: The Servo in IoT

About: I like 100 yen shop. I like home improvement center. I like IKEA. I like motor sports.

Servo arm will be IoT.

I'm using the Google machine translation.

Youtube:

Connect the servo arm to the cloud.

Cloud use the Heroku or Bluemix or AWS, and the like.

It will install the Node-RED to the server and Raspberry PI.

Two Node-REDs will to work together in Websocket.

The client is a WEB browser.

サーボアームをIoTにします。

サーボアームをクラウドに接続します。

クラウドはヘロクやブルーミックスやAWS等を使います。

サーバとラズベリパイにNode-REDをインストールして使います。

2つのNode-REDをWebsocketで連携させます。

クライアントはWEBブラウザです。

Step 1: Preparation(準備)

(1) The servo arm to 3D printing.

https://www.thingiverse.com/thing:746116

(2) The cloud server install Node-RED, and Raspberry PI install Node-RED.

  • Install the UI nodes for Node-RED.

https://flows.nodered.org/node/node-red-contrib-ui

  • Install the node-red-node-arduino.

https://flows.nodered.org/node/node-red-node-arduino

(3) To connect the Raspberry PI, Arduino, and Servo arm.

  • Raspberry PI and Arduino connect a USB or UART.
  • Arduino install the standard-firmata.

(1)サーボアームを3Dプリントしてください。

https://www.thingiverse.com/thing:746116

(2)クラウドサーバとRaspberry PIにNode-REDをインストールしてください。

追加でUI nodes for Node-REDをインストールして下さい。

https://flows.nodered.org/node/node-red-contrib-ui

さらにnode-red-node-arduino をインストールして下さい。

https://flows.nodered.org/node/node-red-node-arduino

(3)ラズベリパイとアルディーノとサーボアームを結線して下さい。

ラズベリパイとアルディーノはUSBかUARTで接続してください。

アルディーノにはstandard-firmataをインストールして下さい。

Step 2: Cloud-side Setting(クラウド側設定)

(1) flow import

source: base_server.json

(2) configration

picture(1): Websocket URL “/api/arm” change.

var wsurl = "wss://" + location.host + "/api/arm";

picture(2): Point is multi clients send message.

delete msg._session;

return msg;

(3) test with web browser

https://your cloud server url/install setting uri/arm

eg. https://yourcloudserver.com/arm

picture(3): If you are connected to the cloud server, it will return a value.

Step 3: Raspberry-PI Side Setting(Raspberry PI側設定)

(1) flow import

source: base_raspberry.json

(2) configration

picture(1): URL change your Server name

eg. wss://yourcloudserver.com/arm

picture(2): arduino Serial port

/dev/ttyAMA0 is gpio pin(TX,RX)

/dev/ttyUSB0 is USB

(3) test with ui panel

http://raspberry pi local ip/install setting uri/ui

eg. http://192.168.1.99/ui

Step 4: Run(実行)

(1) Running in the browser

https://your cloud server url/install setting uri/arm

end of line.

IoT Builders Contest

Participated in the
IoT Builders Contest