Hi, I'm trying to build an to control a modified rc car
I'm using Arduino Nano, hc-05, L298n, wiring is correct and I'm using divider resistors and also its rx to tx ...
I'm sure data is received on Arduino but its not working as expected (weird behavior on toy car)
rc_soft.ino (2.8 KB)
rc_full.aia (3.9 MB)
this is the block I'm using to send my data to nano. should I replace "join" with "list" maybe? or I should add anything else? I put this in clock block with 200ms interval baud rate is 38400
this is how x and y are seperated with "," as delimeter on arduino side
if(hc05.available()){
//String in = Serial.readString();
String in = hc05.readString();
int x_index = in.indexOf(',');
String x_axis = in.substring(0,x_index);
//Serial.println(x_axis);
x_axis = x_axis.substring(1,x_axis.length());
x = x_axis.toInt();
String y_axis = in.substring(x_index+1,in.length()+1);
//Serial.print(y_axis);
y_axis = y_axis.substring(1,y_axis.length());
y = y_axis.toInt();
hc05.print(x,y);
}
last line is just to send data to phone so I can check if data is fine or not
thank you in advance, I'm not looking for improvements just solution to fix the main problem