Quote from Bifrostman on March 18, 2025, 4:51 pmI have connected a motor to the MotorA port. Using the motor with the RoboHeartMotorTest sketch works without any problems. However, when running the RoboHeartBLECarControl sketch I cannot get the motor running.
I have downloaded the latest version of the RoboHeartControl app from the iOS App Store. Connecting the App to the board while running RoboHeartBLECarControl works fine. The SerialMonitor correcly shows the usage of the controls. Thus the data transmission is no problem.
However, the motor does nothing. Connecting motors to ports B and/or C does not work either.
Is there something wrong with the RoboHeartBLECarControl example? Do I need to setup the motors manually in RoboHeartBLECarControl?
I have connected a motor to the MotorA port. Using the motor with the RoboHeartMotorTest sketch works without any problems. However, when running the RoboHeartBLECarControl sketch I cannot get the motor running.
I have downloaded the latest version of the RoboHeartControl app from the iOS App Store. Connecting the App to the board while running RoboHeartBLECarControl works fine. The SerialMonitor correcly shows the usage of the controls. Thus the data transmission is no problem.
However, the motor does nothing. Connecting motors to ports B and/or C does not work either.
Is there something wrong with the RoboHeartBLECarControl example? Do I need to setup the motors manually in RoboHeartBLECarControl?
Quote from sporubcan on March 20, 2025, 12:52 pmHello,
please give me several dozens of minutes, going to analyze this problem.
Best regards,
Sam
Hello,
please give me several dozens of minutes, going to analyze this problem.
Best regards,
Sam
Quote from sporubcan on March 20, 2025, 2:11 pmI found some issue, which can cause, that motor can not run at all. Please find my ticket on https://github.com/Augmented-Robotics/roboheart-arduino-library/issues/6
Have tested it and now it does work.
You need just twice swap two lines of code.
Please let me know, if this helped you!
Best regards,
Sam
I found some issue, which can cause, that motor can not run at all. Please find my ticket on https://github.com/Augmented-Robotics/roboheart-arduino-library/issues/6
Have tested it and now it does work.
You need just twice swap two lines of code.
Please let me know, if this helped you!
Best regards,
Sam
Quote from Bifrostman on March 21, 2025, 11:13 amHi Sam,
thanks for you help. Unfortunately updating the code did not solve the problem.
I have changed the code to:
// Callback for device disconnected eventvoid bleDisconnected() {bleDeviceConnected = false;bleNewStatusReceived = true;Serial.println("device disconnected.");heart.motorA.sleep(true);heart.motorB.sleep(true);heart.motorC.sleep(true);}// Callback for device connected eventvoid bleConnected() {bleDeviceConnected = true;bleNewStatusReceived = true;Serial.println("device connected.");heart.motorA.sleep(false);heart.motorB.sleep(false);heart.motorC.sleep(false);}This should be correct, shouldn't it?However, the result is still the same: Serial Monitor shows correct received commands but no motor is turning...
Hi Sam,
thanks for you help. Unfortunately updating the code did not solve the problem.
I have changed the code to:
// Callback for device disconnected eventvoid bleDisconnected() {bleDeviceConnected = false;bleNewStatusReceived = true;Serial.println("device disconnected.");heart.motorA.sleep(true);heart.motorB.sleep(true);heart.motorC.sleep(true);}// Callback for device connected eventvoid bleConnected() {bleDeviceConnected = true;bleNewStatusReceived = true;Serial.println("device connected.");heart.motorA.sleep(false);heart.motorB.sleep(false);heart.motorC.sleep(false);}
Quote from sporubcan on March 21, 2025, 12:35 pmYes, your corrections are okay.
Could you please paste full serial log? Please do fw/bw and side movement.
How do you power Hercules? USB only, or do you have battery also plugged in?
Could you please make picture of your whole setup, please?
Yes, your corrections are okay.
Could you please paste full serial log? Please do fw/bw and side movement.
How do you power Hercules? USB only, or do you have battery also plugged in?
Could you please make picture of your whole setup, please?
Quote from Bifrostman on March 21, 2025, 1:17 pmThe board is connected and powered via USB C to my Mac Mini. No battery connected.
The same setup works without any problem when running the RoboHeartMortorTest sketch.The Log:
*********New value: 1 69 46MOTOR MESSAGE:command: 1speed: 207steeringPower: 138response: forward******************New value: 2 62 46MOTOR MESSAGE:command: 2speed: 186steeringPower: 138response: reverse******************New value: 4 46 62MOTOR MESSAGE:command: 4speed: 138steeringPower: 186response: left******************New value: 3 46 86MOTOR MESSAGE:command: 3speed: 138steeringPower: 258response: right*********
The board is connected and powered via USB C to my Mac Mini. No battery connected.
The same setup works without any problem when running the RoboHeartMortorTest sketch.
The Log:
*********
New value: 1 69 46
MOTOR MESSAGE:
command: 1
speed: 207
steeringPower: 138
response: forward
*********
*********
New value: 2 62 46
MOTOR MESSAGE:
command: 2
speed: 186
steeringPower: 138
response: reverse
*********
*********
New value: 4 46 62
MOTOR MESSAGE:
command: 4
speed: 138
steeringPower: 186
response: left
*********
*********
New value: 3 46 86
MOTOR MESSAGE:
command: 3
speed: 138
steeringPower: 258
response: right
*********
Quote from sporubcan on March 21, 2025, 1:53 pmHello,
motor drive A will not work. It is not bound to this demo.
Please connect motor to connector B(turn) or C (direction) and let me know!
Best regards,
Sam
Hello,
motor drive A will not work. It is not bound to this demo.
Please connect motor to connector B(turn) or C (direction) and let me know!
Best regards,
Sam
Quote from Bifrostman on March 21, 2025, 2:20 pmWhile I tried this before without success, it now works... 🙂 I guess this is due to the code change to mentioned before.
However, where can I see which connector is bound to the demo?
While I tried this before without success, it now works... 🙂 I guess this is due to the code change to mentioned before.
However, where can I see which connector is bound to the demo?
Quote from sporubcan on March 21, 2025, 2:28 pmThat's great news!
If you want to see the connectors which are by default assigned for steering and forward/backward movement, go to library:
https://github.com/Augmented-Robotics/roboheart-arduino-library/blob/main/RoboHeart.cpp
Please find line 74 there:
setDirectionTurnMotors(motorC, motorB);
You can control also motorA, but using different methods included in.
https://github.com/Augmented-Robotics/roboheart-arduino-library/blob/main/RoboHeartDRV8836.cpp
If you need some hints how to control motorA separately, let me know, please.
Best regards,
Sam
That's great news!
If you want to see the connectors which are by default assigned for steering and forward/backward movement, go to library:
https://github.com/Augmented-Robotics/roboheart-arduino-library/blob/main/RoboHeart.cpp
Please find line 74 there:
setDirectionTurnMotors(motorC, motorB);
You can control also motorA, but using different methods included in.
https://github.com/Augmented-Robotics/roboheart-arduino-library/blob/main/RoboHeartDRV8836.cpp
If you need some hints how to control motorA separately, let me know, please.
Best regards,
Sam
Quote from Bifrostman on March 21, 2025, 2:40 pmThank you very much for the insight.
What is the intended / best way to limit the movement of the direction motor (Motor C)? The current setup simply powers the motor and turns it as long as the control is activated. However the motor should only turn a few revolutions in each direction in order to steer the car.
Additionally: Only the direction motor port works. When connecting the same motor to MotorB, the motor only turns a minimal amount when first activating the control. Than the control does not respond any more (motor does not turn when control is used). In the Serial Monitor it seem as if the board looses BLE connection when using the turn control:
*********New value: 2 65 46MOTOR MESSAGE:command: 2speed: 195steeringPower: 138response: reverse*********�T��}�[BLE_DBG] Service UUID: 000000ff-0000-1000-8000-00805f9b34fb[BLE_DBG] Characteristic1 UUID: 0000ff01-0000-1000-8000-00805f9b34fb[BLE_DBG] Characteristic2 UUID: 0000ff02-0000-1000-8000-00805f9b34fb[BLE_DBG] Characteristic3 UUID: 0000ff03-0000-1000-8000-00805f9b34fbRoboHeart BLE Demo
Thank you very much for the insight.
What is the intended / best way to limit the movement of the direction motor (Motor C)? The current setup simply powers the motor and turns it as long as the control is activated. However the motor should only turn a few revolutions in each direction in order to steer the car.
Additionally: Only the direction motor port works. When connecting the same motor to MotorB, the motor only turns a minimal amount when first activating the control. Than the control does not respond any more (motor does not turn when control is used). In the Serial Monitor it seem as if the board looses BLE connection when using the turn control:
*********
New value: 2 65 46
MOTOR MESSAGE:
command: 2
speed: 195
steeringPower: 138
response: reverse
*********
�T��}�[BLE_DBG] Service UUID: 000000ff-0000-1000-8000-00805f9b34fb
[BLE_DBG] Characteristic1 UUID: 0000ff01-0000-1000-8000-00805f9b34fb
[BLE_DBG] Characteristic2 UUID: 0000ff02-0000-1000-8000-00805f9b34fb
[BLE_DBG] Characteristic3 UUID: 0000ff03-0000-1000-8000-00805f9b34fb
RoboHeart BLE Demo
Augmented Robotics GmbH Bismarckstraße 10 – 12 10625 Berlin Germany
+49 (0)30 590-083296
This project is co-financed by the European Regional Development Fund [ERDF]