C++ source code for mobots...

Electronics Computer Programming Q&A
Post Reply
ungas45
Posts: 6
Joined: Sun Jun 25, 2006 6:32 pm
Location: philippines
Contact:

C++ source code for mobots...

Post by ungas45 »

we're making a project on a line follower robot and would like to ask if anyone can give me a source code in c/c++......need it asap.. we're using a zilog microcontrolller by the way...
JPKNHTP
Posts: 488
Joined: Wed Jun 29, 2005 1:01 am
Location: Missouri
Contact:

Post by JPKNHTP »

-JPKNHTP
-God Bless
Sambuchi
Posts: 366
Joined: Tue Jan 18, 2005 1:01 am
Location: Orlando FL
Contact:

Post by Sambuchi »

I cant help to think ungas45 that this is for a school project and you need this done next week.. :P

There are 2 ways to follow llines analog and digital.

Analog -using the ADC of the micro
Digital - using a Port of the micro

Digital is the basic idea of line following.. either on or off the line... the outcome will be a jig jag on the line

Analog will allow you to use linear controls.. more advanced but you will be able to follow the line smoothly.

If you are ok with C I would start out with analog if not then a digital setup.

You should look at a data sheet to see what the max voltage to the zilog microcontroller PORT AND ADC. Make a circuit around that.

Let us know of any updates!

Here is my robot that I made to follow lines back in college.
http://www.sambuchi.net/Projects/MSP430/Robot/IEEE.htm
Sambuchi
Posts: 366
Joined: Tue Jan 18, 2005 1:01 am
Location: Orlando FL
Contact:

Post by Sambuchi »

This was the same link I looked at when building my robot

http://elm-chan.org/works/ltc/report.html

let me know if you need help with this.
User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Post by philba »

basically, you should do you own homework - write you own code. it's very simple and if you don't know how to write and debug programs, you are in the wrong class.

here are some hints: figure out what your sensors are first and where they should be placed. how many do you have and think about them as an array of bits - 0 means no line inder the sensor, 1 means a line under the sensor. Where do you want to keep the line if you are following it? What should you do if the line isn't where you want it?

If you apply some brain cycles to this you will achieve the goal of your class - to increase your understanding of the subject matter. A rather good idea, I think.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 15 guests