LoginSignup
0
0

More than 5 years have passed since last update.

単にPCから指定した文字列を、USB接続したChibi:bitに表示する

Last updated at Posted at 2017-05-28

PC内の情報を電光掲示板的に表示したい場合などに。

Chibi:Bit側プログラム

basic.forever(() => {
    basic.showString(serial.readLine())
})
basic.showString("WAKE UP")

PC側プログラム

$ ruby -e 'com1=open("/dev/ttyACM0", "r+");com1.write "HELLO WORLD\n";com1.close'

openするデバイス名は、以下の方法で特定する。

$ dmesg | grep cdc
[167938.528490] cdc_acm 3-3:1.1: ttyACM0: USB ACM device

もし、下記のように「Permission denied」になる場合は、chmodする。

-e:1:in `initialize': Permission denied - /dev/ttyACM0 (Errno::EACCES)
    from -e:1:in `open'
    from -e:1:in `<main>'
$ chmod a+rw /dev/ttyACM0

公式で紹介されているscreenを使った方法では、キャリッジリターンの処理が合わないのか、うまく表示されませんでした。

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