LoginSignup
0
0

More than 5 years have passed since last update.

raspberry pi 1 model bで、node-red その7

Last updated at Posted at 2016-10-26

概要

raspberry pi 1 model bの、node-redで、serialでhelloworldしてみた。

開発環境

raspberry pi 1 model b
raspbian 2016_09_23 jessie lite

回路図

ras9.JPG

写真

ras10.JPG

uartの設定

/boot/cmdline.txt を修正します。
具体的には "console=ttyAMA0,115200" を削除。
サービスを削除します。
sudo systemctl stop serial-getty@ttyAMA0.service
sudo systemctl disable serial-getty@ttyAMA0.service

サンプルコード

[{"id":"31aeed8b.df1222","type":"inject","z":"addc1b17.459d98","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":192,"y":156,"wires":[["46046e9c.a9ffb"]]},{"id":"8eccd597.5bce98","type":"serial out","z":"addc1b17.459d98","name":"","serial":"bf19e4f6.9d9348","x":202,"y":364,"wires":[]},{"id":"46046e9c.a9ffb","type":"template","z":"addc1b17.459d98","name":"hello","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"hello world!","x":202,"y":262,"wires":[["8eccd597.5bce98"]]},{"id":"bf19e4f6.9d9348","type":"serial-port","z":"addc1b17.459d98","serialport":"/dev/ttyAMA0","serialbaud":"115200","databits":"8","parity":"none","stopbits":"1","newline":"\\n","bin":"false","out":"char","addchar":true}]
0
0
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
0
0