Problem with Ping + Servo + IR
danielcho88
Posts: 2
I'm trying to get a PING mounted on a standard parallax servo to look left, front, and right (in a loop) and see if there are objects ahead. There are IR sensors also mounted, and the loop goes as such using subroutines:
Look Forward
Ping with Ultrasonic sensor to see objects (if yes, vibrate buzzer)
Check IR sensor for objects (if yes, vibrate beeper)
Look Left
Ping with Ultrasonic sensor to see objects (if yes, vibrate buzzer)
Check IR sensor for objects (if yes, vibrate beeper)
Look Forward
Ping with Ultrasonic sensor to see objects (if yes, vibrate buzzer)
Check IR sensor for objects (if yes, vibrate beeper)
Look Right
Ping with Ultrasonic sensor to see objects (if yes, vibrate buzzer)
Check IR sensor for objects (if yes, vibrate beeper)
and so on and so forth:
SOMETIMES I would turn on the system and everything will work, but then by surprise I find that my servo twitches and stays "stuck" but the ultrasonic sensor picks up things and the IR sensor picks up things. And then I will return to the circuit a couple hours later after giving up, and everything will work again. Then the next morning, things are back to twitching servo and stuck servo [noparse]:([/noparse]
any ideas as to what is happening? This is urgent!
·
Look Forward
Ping with Ultrasonic sensor to see objects (if yes, vibrate buzzer)
Check IR sensor for objects (if yes, vibrate beeper)
Look Left
Ping with Ultrasonic sensor to see objects (if yes, vibrate buzzer)
Check IR sensor for objects (if yes, vibrate beeper)
Look Forward
Ping with Ultrasonic sensor to see objects (if yes, vibrate buzzer)
Check IR sensor for objects (if yes, vibrate beeper)
Look Right
Ping with Ultrasonic sensor to see objects (if yes, vibrate buzzer)
Check IR sensor for objects (if yes, vibrate beeper)
and so on and so forth:
SOMETIMES I would turn on the system and everything will work, but then by surprise I find that my servo twitches and stays "stuck" but the ultrasonic sensor picks up things and the IR sensor picks up things. And then I will return to the circuit a couple hours later after giving up, and everything will work again. Then the next morning, things are back to twitching servo and stuck servo [noparse]:([/noparse]
any ideas as to what is happening? This is urgent!
·
Comments
Dave
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dave Andreae
Parallax Tech Support·