Sweep motion with Adafruit motor shield and Dc motor with encoder


help needed

my goal control dc motor , gearbox rotary encoder sweep left right repeating
here's basis of goal not work  :smiley-roll-sweat:
code: [select]
while (myenc.read() < 50)   {
motor.run(forward);
}
while (myenc.read() >50)    {
motor.run(backward);
}

what motor doing isn't wanted?

your range of swing set low since reverses direction in range 49 51.  have thought of using wider range, <45 , >55?


Arduino Forum > Using Arduino > Motors, Mechanics, and Power (Moderator: fabioc84) > Sweep motion with Adafruit motor shield and Dc motor with encoder


arduino

Comments

Popular posts from this blog

VIDIOC_S_FMT error 16, Device or resource busy - Raspberry Pi Forums

using a laptop skeleton to build a pi laptop - Raspberry Pi Forums

Forum for Joomla? - Joomla! Forum - community, help and support