Bluetooth app not working on 4WD Robot KS0559

Hello all! I am new to this forum and new to the arduino world.
I bought and put together a 4WD Robot - KS0559 and everything looks good, beside one annoying problem that I can't figure out.
I installed the provided Bluetooth module and uploaded the Example no 7 - control via BT mobile app.
Everything works fine - flashing the code (with BT module disconnected), app is connecting, but the control arrows in the mobile app are not producing any effect on the target. I tried both, iOS and Android app - same behavior:(. The serial monitor stays blank.
As power source I am using 6 AA batteries
Any ideas on how I can overcome this issue? An advice would be highly appreciated!
P.S - other example projects are working fine.

Welcome.

Your topic does not indicate problems with the IDE and has been moved to a more suitable location on the forum.


Can you post a link to the robot that you bought.
Is the BT module connected correctly? Tx of Arduino should go to Rx of Bluetooth module and vice versa.
Please post the Arduino code; don't forget to use code tags as described in How to get the best out of this forum.
Do you have source code for the phone app? If yes, please post.

Is there another example that uses Bluetooth; does it work?

Hello! thanks for taking the time to respond and help.
Here is the link to the robot I have:

The code I put is one of the pre-shipped example projects for Bluetooth.
Here it is:

// generated by KidsBlock
#include <Arduino.h>

char ble_val = 0;


void setup() {
  pinMode(9, OUTPUT);
  Serial.begin(9600);
  pinMode(9, OUTPUT);
}

void loop() {
  Serial.println(Serial.available());
  if (Serial.available() > 0) {
    ble_val=Serial.read();
    Serial.println(ble_val);
    if (ble_val == 'F') {
      digitalWrite(9, HIGH);
    }
    if (ble_val == 'B') {
      digitalWrite(9, LOW);
    }
  }
}

I print the data length and it is always 0.
The BT module is well connected and the phone are connecting to it.
The mobile application I am using is the standard one provided in Plays store and called: keyes 4WD
Pressing any buttons in the app will not send anything to the robot.

Any advice would be highly appreciated.

To be honest, I have no idea. You might have swapped RX and TX around if you did not place the BT module in the motorshield but wired it directly.

If you disconnect the BT module, you should be able to actually control the car from the Serial Monitor; typing anything should at least print something different for Serial.available(). Sending 'F' should move the car forward and you should see the character echoed.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.