Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Wall Avoiding Robot programming with CCS C

Status
Not open for further replies.

kingh12

Newbie level 4
Newbie level 4
Joined
Mar 26, 2013
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,335
Hi,
I've just designed my robot's circuit on isis. Everything is ok but the last thing that I have to do is coding the pic. I will use sharp (analog) sensor, but I dont know how to algorithm the data come from the sensor. Can anyone help me with coding this data to the pic? (I want to use CCS C language)
 

wall.png

using just one sensor. pic type is included on picture. the sharp is GP2D12.......the leds on the left are used for the directions of obstacle...if the obstacle is on the left, left led is on.if it is on the right, right led is on. if the obstacle is on the way(middle) middle led is on
 

Are you going to use stepper motors. In the schematic you use simple motors. L298 is usually used for stepper motor drive. You can use transistors or relays for driving the simple motors directly from pic outputs.
You can use an analog input of the pic for the output of the sensor and convert the input voltage to distance with code.
Check the link below, learn some about the sensor usage, it contains a sample code too.

**broken link removed**
 

sharp GP2D12 has minimum obstacle detection range [aprx: 20 cm ]. in 0-20cm range sensor data will be invalid.
sharp GP2D12 output is a linear voltage according to distance [required ADC module ]


I hope this will help
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top