Notifications
Clear all

[Solved] Checking port, baud, address for roboclaw

1 Posts
1 Users
0 Reactions
81 Views
eunsun
Posts: 8
Moderator
Topic starter
(@eunsun)
Member
Joined: 5 months ago

RoboClaw is using the following settings:

  • Port: /dev/ttyACM0

  • Baud rate: 38400

  • Address: 0x80

You can check which port RoboClaw is using on the Raspberry Pi with the following commands:

sudo dmesg | tail -n 30

or

ls /dev/ttyUSB* ls /dev/ttyACM*

With the following code, you can verify that the port, baud rate, and address are correct.
This code requires the roboclaw.py file.

With this code you can check if the port, baud rate and address are correct. For this code, need roboclaw.py file. 

from roboclaw import Roboclaw

PORT="/dev/ttyACM0"
BAUD=38400
ADDR=0x80

rc = Roboclaw(PORT, BAUD)
rc.Open()

ok, version = rc.ReadVersion(ADDR)
print("ReadVersion:", ok, version)

Share:
Scroll to Top