AFMotor shield - PWM strangely getting interrupted by sketch code


after removing lot of delays, have still been unable fix pwm output. getting interrupted something.

the problem anywhere. modified afmotor library use analog pins motor shield. other wires shield pwm pin 5 , 5v + gnd.

lcd keypad shield using liquidcrystal lcd(10, 12, 6, 7, 8, 9);
motor shield using pin 5 pwm, 4 analog pins (15-18 or analog 1-4, clk, enable, data, latch)
temp sensor using digital pin 2

using test sketch , same afmotor library, motor runs fine @ speed 50, speed high 196 in dodgy sketch not run fan. fan seems pulsating backwards , forwards, after making forward possible option in library, 50 being minimum possible speed.

the library tested after modifications, minimal test sketch, , worked every time @ speeds 50 , 255.

i appreciate advice.

sketch: https://www.dropbox.com/s/r9f30y8b8fmgki7/ds18x20_temperature.ino

you changed library, don't show have changed.
the pin numbers of afmotor library hardcoded in library, if miss 1 of them, library no longer works.


Arduino Forum > Using Arduino > Project Guidance > AFMotor shield - PWM strangely getting interrupted by sketch code


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