South Africa
Asked — Edited
Resolved Resolved by Rich!

Trying To Get The Esc Into Reverse (Tamiya 101Bk)

Hi,

I'am having trouble with my programming, I cant seem toe get the ESC to go into reverse. I'm a new user of the ARC software so it could just be me interpreting the code wrong but this is what I wrote to try and get the ESC into reverse.

Move(D0, "stop") Movement_Wait("stop") Move(D0, "reverse") Movement_Wait("reverse") Servo(D0, 100)

Every time i run the code it tells me that there is a problem with the word "stop".

Any help will be greatly appreciated.

(I'm using the key control to control the movements)


ARC Pro

Upgrade to ARC Pro

ARC Pro is your gateway to a community of like-minded robot enthusiasts and professionals, all united by a passion for advanced robot programming.

United Kingdom
#1  

First, the Move() command is for Modified Servos. Are you sure this is the correct command?

Second, you need to remove the quotes for the move commands. Edit: Quotes are needed.

Also, the Movement_Wait() commands are redundant in your code. It would act the same way with or without them.

your code should look like;

Move(D0, "stop")

Move(D0, "reverse")

Servo(D0, 100)
South Africa
#2  

I tried your code, but the ARC software tells me "Missing String Quotes or Invalid Expression: stop "

So I assume it has something to do with the word stop, but I don't know how to resolve the issue.

South Africa
#3  

And sorry, I'am not sure that the First, the Move() command is for Modified Servos. I'am new to all of this, trying to build my first robot.

#4  

Are you using modified servos or gear motors to drive your robot? The Move command is for servos that have been modified for 360 deg rotation... Geared motors are a whole different animal... You will need to use something like the Forward() command or the Serial command if using a Sabertooth motor controller or H-Bridge... If you don't know, maybe you can show us a picture of your robot and it's motors?

#6  

ESC as in a motor speed controller? What about your motors themselves? what are you using? PWM might work with the ESC then

South Africa
#7  

Oky, can you please give me an example of how the code would look.

#8  

Depends on the motors you are using... We really need to know what motors you are using... An ESC is a speed controller (for DC motors) that I used to use when I was into flying electric model planes... I didn't know they could be reversed other than swapping + and - wires around on the motors... Anyway PWM(D0,$duty) .. where the variable $duty can be any number from 0 - 100... 0 is stop and 100 is full power... But I am still struggling to understand how you would get ESC controller to go in reverse...

EDIT Looks like it can be reversed... my experience is limited when it comes to ESC as I only have used them for flying where there is no need for reverse... Anyway, try PWM and see if that will drive your ESC...

PWM(D0,$duty) # $duty is any number from 0 to 100