go_away

Author Topic: help in writing code  (Read 1147 times)

0 Members and 1 Guest are viewing this topic.

Offline switchbladeTopic starter

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
help in writing code
« on: January 26, 2009, 09:29:45 PM »
hey guys I am a final year student doing an electronics diploma and i have decided to build a line following robot with obstacle detection as myy final year project. I have all the electronics parts down but i am really baffled on how to start programming the pic. If i dont do this project well i'll get kicked out of school.
I really want to do this project properly.
A typical confusion of mine is:
For example i know how to build the light sensor array and send the feedback to the input of the PIC but how do I instruct the PIC to tell the motors to move left and right and by how much to do this according to which sensor sends back a signal??

I would appreciate any help.........damn if i have to pay for help i mite do it lol
but please guys i'm a desperate here

Offline cosminprund

  • Robot Overlord
  • ****
  • Posts: 284
  • Helpful? 8
Re: help in writing code
« Reply #1 on: January 27, 2009, 09:38:08 AM »
Google is on your side and it will not complain about helping you with school projects.
Google for "PIC line following"; The third link is a link back to this site, there's a tutorial for doing line following with an PIC18F; In includes source code:

http://www.societyofrobots.com/robotforum/index.php?topic=4693.0

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: help in writing code
« Reply #2 on: January 27, 2009, 10:01:01 AM »
To that, I'll have to add.
Remember that you need to understand it completely to write your report!

And if you get kicked out, you probably never should be let into engineering - just call me oldfashioned, but I'd hate to board a plane where a near-flunkee (who just got his/hers exam by other peoples help/designs) made some of the flight control design!
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline switchbladeTopic starter

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
Re: help in writing code
« Reply #3 on: January 27, 2009, 05:00:52 PM »
haha true there is no way in hell i will go to the final interview with my project that is something copy and pasted..........thats why i am trying to understand how to do this. Yup google has alot of stuff but the problem is where to start!!

i started my hardware design what i am using for the line dectector and motor control but i am having trouble visualising how to control the motors to turn left and right smoothly. But i'll try n ponder on that. Thanks for the feedback guys

 


Get Your Ad Here