Let's Make Robots!

Ultrasonic range finder SRF04

Hi,

I am a beginner. 

I have got a PIC18F252 to run a line follower robot. I would like the chip to run an sfr04 ultrasonic range finder SRF04.  basically if the SRF04 detects an object infront of it, it then turns away.  I am programming in C and am stuck. 

Has anyone got a programme or could somone please point me in the right direction.

 Any help would be great

 Thanks 

Line Follower Robot using a PIC18F252 microcontroller

I am using C Programming to program a PIC18F252 microcontroller chip that allows a robot to follow a line then change directions in different direction on each end and also senses blockage and goes back. This is my code wich at the moment is giving me problems allowing the robot to change directions in different directions and sense blockage...can anyone see where i am going wrong and help out?????????

 


#include <p18F252.h>