Help with servo (first time use)
hello
this first time use servo , think miss understanding
i want servo move right or left according compare
for example
int enternumber=200
int comparenumber=100
if (enternumber<comparenumber)
{
//servo go right 1 sec
}
else if (enternumber=>comparenumber)
{
//servo go left 0.5 sec
}
thanks ,
this first time use servo , think miss understanding
i want servo move right or left according compare
for example
int enternumber=200
int comparenumber=100
if (enternumber<comparenumber)
{
//servo go right 1 sec
}
else if (enternumber=>comparenumber)
{
//servo go left 0.5 sec
}
thanks ,
personally, don't think makes sense move servo specific length of time: rather move number of degrees, or position. distance moved in time depends on load; servo apps witih position, moving linkage unlock door example.
when sketch starts, centre servo 90 degrees; move "left" 45 degrees say, or "right" 135 or whatever.
edit: @ servo sweep example coding.....
when sketch starts, centre servo 90 degrees; move "left" 45 degrees say, or "right" 135 or whatever.
edit: @ servo sweep example coding.....
Arduino Forum > Using Arduino > Project Guidance > Help with servo (first time use)
arduino
Comments
Post a Comment