Continuing on my mash-up projects with the DXL MKR Shield, here are my current progress on using the ESP32 S3 controller with the Dynamixel2Arduino Library using the wire-wrap experimental carrier developed for my previous ESP32 mash-up project, see post below
First, using this board with Windows 10 (at least on my current PC) requires me to manually set this board to LOAD mode in order to upload my sketch from the PC to this S3 board using a combination to the BOOT and RESET buttons, and then manually use RESET again to run the uploaded sketch (EVERY SINGLE TIME!). The Arduino IDE won’t be able to flip-flop automatically for the user between the loading and running USB Ports with the current version of ESP32 S3 (for example like for the Portenta H7 Lite).
Second, the usual Arduino Pin labeling “Ax” scheme no longer applies. For example to use the Pin “A5”, now one just specifies “5”.
Thirdly, Serial1 can still be used for the DXL Control Port, but one needs to begin Serial1separately and before the beginning of the usual Dynamixel2Arduino instance/handle, see picture below:
Next, I checked to see if my Sync Read Write sketch still worked on a Single Core (Core 0 or Core 1, one at a time), and I am glad to report that it worked well with the ESP32 S3 also:
The maker of the UM Feather S3 board told me that the Ax notation for I/O Pins is “outdated” and GPIO Pin Numbers are preferred nowadays. You can see the pinout of the UM board used here (Introducing the FeatherS3 by Unexpected Maker), Then you can use the IOx numbers to modify the Ax entries in the corresponding file pins_Arduino.h: for example A5 = 5 and A0 = 17 so that you don’t have to do much editing to your existing sketches which probably use the Ax notation.
I found that the “task hanging” issue reported earlier for the Dual Core application was simply due to the SIZE of the STACK. I used 2048 or 3072 for my new tests, but I have not tried to pin down the optimal values yet as the UM Feather S3 has plenty of memory for my needs.
The picture below shows typical results displayed on Serial Monitor (physically, the 4 servos were performing as they were supposed to):
Looking at the Time Stamp values, you can see that several printouts have the same Time values, this is because the Time Stamp resolution is rather “coarse”, about 47 ms. So we had about 12 println per block of 47 ms! That pretty fast multi-tasking for robots, but may be needed for the more expensive DXLs that run at 4-5 Mbps?
Occasionally the Serial Monitor got “jumbled up”, i.e. lost a Next Line character so Output from one Task got mingled with Output from the other Task. So I wonder if the Present Velocity value of 2072 highlighted in yellow was a real Read error or it was just a matter of Serial Monitor being messed up by the ESP32 Task Scheduler? These issues will be need to be looked at more closely later.
In summary, this mash-up project is working out very well, and maybe ROBOTIS would be interested in making a PCB Carrier that only has 3 or 4 Stacking Headers? Two would be used to hold the MKR DXL Shield itself, then at least 1 Stacking Header to hold the header that contains the TX and RX pins of the considered 3.3V Arduino Variant board. That is the minimum to perform the Custom Wire Wrapping needed. This PCB Carrier would be handy for ROBOTIS users who do not have access or skills for soldering, but “everybody” should be able to do “wire-wrapping”!
Just got in today an Adafruit Feather S3 4 MB Flash 2 MB PSRAM. It also got the same issues with needing to use the BOOT & RESET buttons to get into LOAD mode and into RUN mode as the UM board. I am beginning to think that THIS IS a FEATURE of the S3
Don’t know when Espressif and/or Arduino are going to fix this issue as according to this Github post, this issue had been discussed since May 2022.
The ESP32 C3 seemed to have similar issues but supposedly the C3’s issue was fixed/closed in Feb 2023 with Update 2.0.7.
May be S3 will be fixed at the next round? Ones can always hope!
Otherwise, the Adafruit Feather S3 board is working well for me.
Also I mounted the Adafruit Feather S3 using only 1 Stacking Header and thus let the other header “float”, but the whole module is sturdy enough so far.
Thanks, I can use that, but I was looking for the complete Arduino sketch so I can understand what is happening before I insert my own code. Is that possible to send?
UPDATE 8/9/2023:
Sorry about the delay, but with the recent Arduino ESP32 boards updates (V. 2.0.11) and ROBOTIS Dynamixel2Arduino Library V. 0.7.0, I have found that my previous sketches do not work properly anymore. So I am in the process of rechecking everything now, hardware and software - so far not successful.
UPDATE 8/12/2023: @crk142
I recently made a thorough review of my previous hardware/software solutions and I have to say that I can’t implement them any more for reasons still unknown to me. You can see more details of my findings for the Adafruit ESP32 V2 here: