2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

北陽電機 URG-04LX-UG01 mac コンソールで通信してみた

Last updated at Posted at 2020-05-21

北陽電機 測域センサをmac コンソールで通信

測域センサをROSなどを使って使用することが一般的になっているが、動作チェックをしたくて、SCIP2.0(シリアル通信ベース)やってみようとしたら、ハマった。
なんとか通信チェックができたので、関連記事などを まとめておく.

手順

  • ひとつめのターミナル1を開く
[terminal:1]
sudo stty -f /dev/cu.usbmodem14101 raw 19200
cat /dev/cu.usbmodem14101 
  • ふたつめのターミナルを開く
[terminal:2]
cat - > /dev/cu.usbmodem14101  

以下は、このふたつめのターミナル2にSCIP2.0のコマンドなどを打ち込むとひとつめのターミナル1に返答がかえってきた。
例えば、以下のようにターミナル2に入力すると

[terminal:2]
SPIC2.0

ターミナル1には以下のような返答が帰ってきた。

[terminal:1]
SPIC2.0
0Ee

同様に、一箇所だけスキャンするコマンドをターミナル2から送信すると

[terminal:2]
MD0384038400001

やったー!

[terminal:1]
MD0384038400001
00P

MD0384038400000
99b
8C?6`
00e5

やった〜!
ひさしぶりに、かなり、うれしい!

ハマった原因

  • tty.usb*** ではなく cu.ubs*** で接続する

参考になったサイト

関連サイト

著者の関連ページ

2
1
1

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
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?