Read Functions with USB-TTL
Read Functions with USB-TTL
Hello,
I am currently trying to communicate from a NVidia Jetson Nano over USB-TTL with two RoboClaws (multi-unit).
Sending the Speed commands and all works flawlessly. However, the Read (readenc, readspeed) functions would always return 0.
I intend to control the RoboClaws over a python ROS node but at the moment I am just trying to get the communication work with the roboclaw_read.py script from the roboclaw_python_library and one roboclaw at the time.
I tried changing adresses and baudrates but the script still returns "failed" for everything. While I am able to send a speed command.
Any idea what the source of error could be?
EDIT:
I located the source of error. Reading the encoders works when multi-unit mode is disabled. however when it's enabled, I cannot read anything.
My setup looks as follows: I connect a USB-TTL cable to my Jetson nano and from there I connect two parallel cables for each (TX, RX, Ground) to the two RoboClaws. I leave the power cable of the USB-TTL aside. Also, I install no pull-up resistor. I configure my two RoboClaws to enable multi-unit serial mode.
Is that a completely wrong way to do it? How should I do it instead?
EDIT2.0:
All good I got it. I need a pull up resistor. Unless I am connecting the first roboclaw to the jetson over USB and the second roboclaw to the first over UART (which is what I'm doing now)
I am currently trying to communicate from a NVidia Jetson Nano over USB-TTL with two RoboClaws (multi-unit).
Sending the Speed commands and all works flawlessly. However, the Read (readenc, readspeed) functions would always return 0.
I intend to control the RoboClaws over a python ROS node but at the moment I am just trying to get the communication work with the roboclaw_read.py script from the roboclaw_python_library and one roboclaw at the time.
I tried changing adresses and baudrates but the script still returns "failed" for everything. While I am able to send a speed command.
Any idea what the source of error could be?
EDIT:
I located the source of error. Reading the encoders works when multi-unit mode is disabled. however when it's enabled, I cannot read anything.
My setup looks as follows: I connect a USB-TTL cable to my Jetson nano and from there I connect two parallel cables for each (TX, RX, Ground) to the two RoboClaws. I leave the power cable of the USB-TTL aside. Also, I install no pull-up resistor. I configure my two RoboClaws to enable multi-unit serial mode.
Is that a completely wrong way to do it? How should I do it instead?
EDIT2.0:
All good I got it. I need a pull up resistor. Unless I am connecting the first roboclaw to the jetson over USB and the second roboclaw to the first over UART (which is what I'm doing now)
- Basicmicro Support
- Posts: 1594
- Joined: Thu Feb 26, 2015 9:45 pm
Re: Read Functions with USB-TTL
Glad you figured it out. Let me know if you need anything else.