After so much implementation problems from your end, so I decided to drag out all my Arduino boards and CM-530, and do this project myself.
On my Arduino R4 Minima, I used this sketch:
uint16_t TxData = 0;
uint8_t TxD_packet[6] = {0xFF, 0x55, 0, 0, 0, 0};
void setup() {
// initialize both serial ports:
Serial.begin(115200);
Serial1.begin(57600);
delay(2000);
}
void loop() {
for (int i=0; i < 51; i++)
{
TxData = i;
TxD_packet[2] = lowByte(TxData);
TxD_packet[3] = ~TxD_packet[2];
TxD_packet[4] = highByte(TxData);
TxD_packet[5] = ~TxD_packet[4];
Serial1.write(TxD_packet, sizeof(TxD_packet));
Serial.println("Sending Music Scale No.\t" + String(TxData));
delay(5000);
}
}
Essentially, every 5 seconds the R4 will send a number between 0 and 50 through Serial1 over to the CM-530.
On the CM-530, I used a simple TASK program which will pick up this number and use it as a Musical Scale and play it.
First Project: Using wired connection between R4 and CM-530
Below is my first test configuration, whereas I modified the SMALLER end of the typical Wireless Cable used for BT-210/410 (which you already ordered). TX and RX were cross-overed as required.
At run time for both boards, every 5 seconds, I saw the blue LED (RxD) blinks on briefly on the CM-530, meaning that it did receive a BT RC-100 packet, but the CM-530 did not play the music scales as programmed!
As if it did not want to process the RC-100 packet! But I know that this technique had worked for me before (as documented in my Arduino book Section 2.11 for dual OpenRB-150 back in 2022). So what happened between now and then?
Second Project: Using wired connection between OpenRB-150 and CM-530
Below is my second test configuration, whereas the same modified wireless Cable used for BT-210/410 is used between Serial3 on the OpenRB-150 and the CM-530, and TX and RX were cross-overed as required.
And exactly the same previous results with the R4 happened again! So I scratched my head for a while and “expletives deleted”.
And then I realized that I forgot the most fundamental principle in using ROBOTIS systems: although the OpenRB-150 is an open-architecture board, the CM-530 is a closed/proprietary board. Consequently, the CM-530 only works with ROBOTIS hardware. Technically speaking, I think it got to do with the FTDI communication chip, used in all past-present-future ROBOTIS systems, and each FTDI chip is licensed so there must be some “secret handshakes” going on behind the scenes within the firmware of the CM-530.
From the user’s point of view, the only choice we have is to figure out a way to “fake out” the CM-530 into thinking that it is receiving an RC-100 packet from the RC-100B Physical Remote Controller that came with your Premium kit (even though it actually came from an Arduino board). Luckily, you still have your matching set of BT-410s (right?).
Right now, you should have the BT-410 (Peripheral module) installed in the head of your Premium Humanoid and it is plugged into the 4-Pin Comm. Port on the CM-530.
The master BT-410 has been connected to the RC-100B, so you need to disconnect it from the RC-100B and modify its BIGGER END using Dupont Pins as shown below:
You have my Arduino book, so the details of the wiring work is shown in Fig. 2.10. You have your order of the wireless cables being sent to you right? So if you cannot wait, go ahead and modify your existing Master BT-410 cable per the above picture.
Third Project: Using wireless BT-410 connection between UNO R4 and CM-530
The picture below shows how the rewired Master BT-410 is hooked up to the R4.
And on the CM-530, I hooked up my Peripheral BT-410 as shown below:
And I restarted all programs, and everything worked as it should, view the short video enclosed below.