Monday, February 6, 2012

HY-SRF05 Sensor

Free no deposit poker bonus at BankrollMob

Ok got my HY-SRF05 distance sensor today ... and after a bit of googling managed to figure out how to wire it up to get it working. Works fine with only a few glitch readings .... next step was to get it to work with a servo.  This proved to be a bit trickier ... but have just managed to put a bit of code together to do this.  Have got it that if it detects a object = or less than 10cm away the servo will turn to the left ... if no object in front of it or further away than 10cm it will rotate servo back to the front. Nothing amazing about this code but hopefully it is a start to writing a complete object detection and avoidance program.


Just trying out sensor on servo .... will have to work on how to mount this as cant be using blue tack ........

1 comment: