Arduino released UNO R4 back in July 2023, and I got interested in it, because finally the UNO R4 has a separate hardware USB for Serial Monitor (now as Serial()) and another hardware UART for DXL Control (now as Serial1() still via D0 and D1). So in theory it should be compatible with the DXL Shield (which was designed for UNO R3 and earlier).
I got my UNO R4 WiFi yesterday and I just got through my first tests with it and some 2XL-430 (see my setup below).
-
I got COMPILE errors due to Variable Naming conflicts between the RENESAS Library and the Dynamixel2Arduino library regarding Control Items LED_RED, LED_BLUE, and LED_GREEN - which were easily fixed as LED-REDD, LED_BLUEE, and LED_D_GREENN in Dynamixel2Arduino.cpp, Actuator.h and Actuator.cpp.
-
Next test with simple Position Control using position_mode.ino modified for UNO R4, i.e.
#include <Dynamixel2Arduino.h>
#define DXL_SERIAL Serial1 // for UNO R4 Wifi
#define DEBUG_SERIAL Serial
const int DXL_DIR_PIN = 2; // DYNAMIXEL Shield DIR PIN
const uint8_t DXL_ID = 1;
const float DXL_PROTOCOL_VERSION = 2.0;
Dynamixel2Arduino dxl(DXL_SERIAL, DXL_DIR_PIN);
It compiled and downloaded OK, but no response from the ID=1 servo at all at run time:
- Next I tried Velocity Control mode with velocity_mode.ino. Compiled and downloaded OK. But still no response at run time
- Lastly, I tried my favorite test using SyncWriteRead to 4 DXLs, 2 set up in Position Control and 2 set up in Velocity Control. And unexpectedly, it “kind of” worked: all 4 DXLs seemed to be doing their “randomized” motions during run time (but their motions were not as “crisp” as if I were using an OpenRB-150). Present Positions were coming in “slower” (as compared to OpenRB-150), and very strangely NO PRESENT VELOCITY packets were received!
This is a video clip of the SyncWriteRead test:
In conclusion, Serial() and Serial1() do work independently on the UNO R4 Wifi, but some updating, hardware and software wise, are still needed from ROBOTIS (or from RENESAS too), so I would not recommend folks to rush out and buy the UNO R4 right now, if your main objective is to use DXLs.