Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TBLE-02S doesnt respond #4

Open
Zeepblok opened this issue Nov 29, 2019 · 1 comment
Open

TBLE-02S doesnt respond #4

Zeepblok opened this issue Nov 29, 2019 · 1 comment

Comments

@Zeepblok
Copy link

have a question. I'm following this git. We use the same ESC onnly mine doesnt work

#include <Servo.h>

Servo m1;

int speed = 0;

void setup()
{
  Serial.begin(9600);
  m1.attach(9);
}

void loop()
{
 
  if (Serial.available() > 0) {
   
    speed = Serial.read();

    Serial.print("My speed = : ");
    Serial.print(speed);
    Serial.println();
   
  }
 m1.write(speed);
}

Only it doesnt work. When I send a number from 0 - 180 I do hear a small TJK like sound from the engine, and sometimes it spins a tiny bit but then stops. If I send 90 (neutral) the led on the ESC geos off. If I send another number it burns brightgreen or flashes green (depending on the number) How can I fix this? I used this manual to calibrate it because your link was dead: https://www.tamiyausa.com/media/files/45057ml-801-efb9.pdf

@UvinduW
Copy link
Owner

UvinduW commented May 10, 2020

Hi, apologies for not replying on time. I missed the notification for this post.

I hope you managed to solve the issue in the end. I currently don't have access to the hardware, so I can't test any code myself.

If someone faces the same issue, I'd suggest perhaps using Serial.parseInt() to read the value as that would let you read the whole integer from the input buffer in one go. This would also allow the m1.write() line to be moved inside the scope of the if statement as it only needs to be run when a new speed command has been received.

Alternatively, I've created a similar script for a different project that is available here: https://github.com/UvinduW/Project-Intelligent-Car/blob/master/Arduino/arduino_dev_files/arduino_control_test/arduino_control_test.ino

The pin associations might need to be adjusted to match what's used in this project. That script accepts both a speed and steering value, so both will need to be provided though only the speed value matters for calibration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants