Pārlūkot izejas kodu

将树莓派与arduino连接的串口修改为ttyAMA0

corvin 5 gadi atpakaļ
vecāks
revīzija
dfc473288e

+ 1 - 1
src/ros_arduino_bridge/ros_arduino_python/config/my_arduino_params.yaml

@@ -3,7 +3,7 @@
 # For a wireless connection like XBee, the port is typically
 # /dev/ttyUSB# where # is a number such as 0, 1, 2, etc.
 
-port: /dev/ttyACM0
+port: /dev/ttyAMA0
 baud: 57600
 timeout: 0.5
 

+ 1 - 1
src/ros_arduino_bridge/ros_arduino_python/nodes/arduino_node.py

@@ -39,7 +39,7 @@ class ArduinoROS():
         # Cleanup when termniating the node
         rospy.on_shutdown(self.shutdown)
 
-        self.port = rospy.get_param("~port", "/dev/ttyACM0")
+        self.port = rospy.get_param("~port", "/dev/ttyAMA0")
         self.baud = int(rospy.get_param("~baud", 57600))
         self.timeout    = rospy.get_param("~timeout", 0.7)
         self.base_frame = rospy.get_param("~base_frame", 'base_footprint')