跳转至

Arduino


Arduino IDE Install

Bash
wget https://downloads.arduino.cc/arduino-1.6.9-linux64.tar.xz
tar xvf arduino-1.6.9-linux64.tar.xz
sudo ./installl.sh

Permission Problem

Bash
sudo usermod -aG dialout $USER
sudo chmod a+rw /dev/ttyACM0

Arduino and Sensors

Ultrasonic Sensor

ROS程序读取HC-SR04数据

  1. 按上图接线

  2. 烧录 ultrasonic_ros.ino 程序到 Arduino

  3. 分别启动如下脚本

    Bash
    roscore
    rosrun rosserial_python serial_node.py /dev/ttyACM0
    rostopic echo /range_ultrasonic