having problem with interrupts and servo motors
i using sabertooth 2x25 drive 2 motors ( using servo ) robot , using 6 sharp gp2d15 ir sensor obstacles avoidance. ir sensor gives 1 when sense , 0 when nothing sensed. use arduino interrupt, used not gate 7404 invert signal.
but when interrupt occurs, wheels didn't change direction how programmed do.
i had tried using led check whether interrupt occurs or not, using oscilloscope check out waveform , sort. working fine, once change code control motor, interrupt occur motor didn't change direction.
as mentioned, used oscilloscope check servo pulse generated, interrupts occurs, no servo pulse generated.
any kind soul can me problem? had attached program below.
but when interrupt occurs, wheels didn't change direction how programmed do.
i had tried using led check whether interrupt occurs or not, using oscilloscope check out waveform , sort. working fine, once change code control motor, interrupt occur motor didn't change direction.
as mentioned, used oscilloscope check servo pulse generated, interrupts occurs, no servo pulse generated.
any kind soul can me problem? had attached program below.
you can detect rising or falling signals, don't see why need invert it.
the low interrupt have chosen continuously fires if signal low. suggest change rising or falling , rid of inverter.
the low interrupt have chosen continuously fires if signal low. suggest change rising or falling , rid of inverter.
Arduino Forum > Using Arduino > Programming Questions > having problem with interrupts and servo motors
arduino
Comments
Post a Comment