Firstly I want to thank all those that gave me advice last year that enabled me to program a Halloween display.
I think I have read all posts and documentation regarding this, but haven’t found a clear answer. Since my experience limited I may have missed or mis-understood the correct answer.
I am building a new display that currently uses the following hardware:
Mega
DC motor controller
Adafruit Music Maker
L298N motor control boards
Adafruit TLC59711 PWM boards
Adafruit PCA PWM driver board
I also have:
Dynamixel shield
U2D2 power hub board with U2D2
If possible want to incorporate some robotic arms that use a combination of MX-28 and MX-106 motors. I have no problem controlling them using a PC and the U2D2 power hub board. I am now trying to control them with a Dynamixel shield mounted on the Mega. I understand about the pin conflict and the need for switching between upload and Dynamixel control, however for testing purposes I need to be able to use the serial monitor at the same time the motors are connected.
What I am trying to figure out is,
Is there a way to redirect the serial monitor to a software serial port?
Would this allow for simultaneous Arduino to PC and Arduino to motor communication using the hardware I have?
If not, What would be the recommended setup?
Am I crazy to consider this? (I already have that answer)
Thank you in advance for any assistance you can provide
@oldgeezer2 You are not crazy! And I had the same problem, but there is a solution.
Can you afford to upgrade to an UNO R4? This one has 2 hardware serials so it will take away “lots of pains” from your work. And you can use all your old hardware and software previously developed.
Thank you for the info on the board and I am looking at it as an alternative to what I am currently using. I had seen the referenced post before, but didn’t see it after you had success with it so the R4 was off the table.
Even though the R4 probably is the best idea, just for s and s I also want to test the U2D2 UART to Mega connection idea. I have the parts and tooling to make the interconnect cables required to communicate with the motors, however none of the housings are the one that mates with the U2D2 UART connector. I have searched but can’t find a reference to the part number for that connector. Do you know if this is documented anywhere?
As far as the crazy part goes, we will leave that open for debate.
While waiting for the UNO R4 to get here I worked on the software serial connection using the U2D2. I used a modified connector and was able to receive the output, but the test sketch I was using didn’t have provisions for reading input, I did however see the LED on the U2D2 blink so I am assuming if setup it would be bi-directional communication.
While diddling around I realized the question I originally asked was not correct. My previous setup did not have a conflict and I was able to use the IDE to display a menu in the serial monitor window and send any of about 50 pre-canned commands to the various connected devices to test them. I am trying to accomplish that same functionality when the Dynamixel shield is used so I think what I should have asked is:
Is there any setup that would allow the IDE interface to access the Arduino using any other HW or SW port?
Just a curiosity since the R4 has the separate serial interfaces and this should not be an issue.
The U2D2 is bidirectional so it can receive DXL packets as well as your ASCII text. The Serial Monitor will print those DXL packets as “gibberish”. So it is best to have two separate serials, each of them handling their own info.
Thank you for the HW suggestion. The R4 arrived and after some futzing I think I got the communication working the way I wanted. I modified the ping example and get response from the motors.
I have a programming question that I will ask in a different post.