8.4.2. IR 紅外線感測器

  • 預設 PIN 腳

Device

PIN

IR sensor

ROBOTIS_5-PIN 2

Tip:如要使用其他 PIN 腳,請參考 OpenCR PIN 腳位圖

  • 於 Turtlebot3 使用操作

警示:在執行範例前,請務必要執行 Bringup 啟用 TB3 章節的說明

[Remote PC端]:執行 cliff launch 檔 (偵測懸崖)

$ roslaunch turtlebot3_example turtlebot3_cliff.launch
  • 於 Arduino IDE 使用操作

此範例可用 Arduino IDE 開啟。選擇 File -> Examples -> ROS -> 2. Sensors -> b_Cliff. 上傳到 OpenCR。

[Remote PC 端]:執行 ros serial_node 套件

$ rosrun rosserial_python serial_node.py __name:=turtlebot3_core _port:=/dev/ttyACM0 _baud:=115200

Last updated