
Bernard104
South Africa
Asked
— Edited

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)
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;
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.
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.
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?
I'm using a ESC not a servo
ESC as in a motor speed controller? What about your motors themselves? what are you using? PWM might work with the ESC then
Oky, can you please give me an example of how the code would look.
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...