the code :
#include <Servo.h>
Servo myservo;
void arm(){
setSpeed(0);
delay(1000); //delay 1 second, some speed controllers may need longer
}
void setSpeed(int speed){
int angle = map(speed, 0, 100, 0, 180);
myservo.write(angle);
}
void setup()
{
myservo.attach(9);
arm();
}
void loop()
{
int speed;
for(speed = 0; speed <= 100; speed += 5) {
setSpeed(speed);
delay(1000);
}
// sweep back down to 0 speed.
for(speed = 95; speed > 0; speed -= 5) {
setSpeed(speed);
delay(1000);
}
}
the contact way
http://83.56.32.125/images/smesquema.jpg
all work ok with me .. but i want know what is must to edit from this code to can remove the pot ?
There's nothing in that code that has anything to do with the pot in the first place.
u mean if remove pot it will work without any edit in code ?
Well what line in that code do you think relate to a pot?
There isn't even a line that relates to a input.
JimboZA:
Well what line in that code do you think relate to a pot?
Yahia_Elsaeed:
idk
You should work through the code line by line to answer my question. Answer is "none", as Isaac96 points out:
Isaac96:
There isn't even a line that relates to a input.
So that code will not care if there's a pot attached or not.
MarkT
June 21, 2015, 8:49am
9
Yahia_Elsaeed:
so can i use this connection now
http://api.ning.com/files/QYxylXSaas588I6jwxcoAJR8lBXneWApDBFHGCoOMg7Ge975QGTPeT0Qinw4ffnFDRoWYf7TcktkQRYX--0YwbQT05HgK*zp/arduino_esc_lucaszanela_com.png
without any modified in code ?
Well you've removed the 5V supply to the Arduino from the ESC's BEC.
You'll have to have USB plugged in therefore.
Actually I'd never trust the BEC in a cheap ESC to power anything in the first place, I've seen ESC's
explode and die spectacularly...
i use EMAX esc and it has high quality
I use Turnigy Plush. But I really killed one of my 3S LiPo batteries (it seems to have been crumpled) and the voltage dropped to 6V. I was wondering why the receiver wasn't turning on.