Help getting started with programming PIC Microcontroller

Thread Starter

ztjust

Joined Apr 1, 2012
12
Hello, I'm trying to program a PIC16F87X microcontroller for distance measuring using a infrared sensor. Essentially I want to make a device that has a couple of LEDs, a display, a dial, and a sensor.

Essentially I want to attach measure how far away I am from a wall. I want to attach the device to a tube or stick. I would go up to the wall and set a distance I want to travel before being alerted. So I'll set 20 inches or so. Then I would zero the measurement so it starts at zero. Also, a red LED is on telling me I'm not at my goal. When I reach 20 inches, a green LED will turn on saying I'm at the distance.

I am somewhat new to programming so I was wondering if someone could help me out or point me in the right direction so I could teach myself.

Thank you so much for any help.
 

BillO

Joined Nov 24, 2008
999
Do you want to measure along the wall or how far away from the wall?

I don't think using IR would be a good method either way, but measuring distance along the wall would be very difficult. Also, measuring distance from the wall would only really work well (easily, that is) at close range.

Have you thought of using sonar? Sonar sensors with all the logic built into them can be had for under $5. They are good for quite a few feet.
 
Top