Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Robotics Chat


Robotics Chat Specific to discussions about robots and the making of.

Reply
 
Thread Tools Display Modes
Old 27th March 2005, 09:59 AM   (permalink)
Experienced Member
UnD3aD is on a distinguished road
Default line follower robot program

Code:
#include <system.h>

void main()
{
trisa = 00b;
trisb = 111b;
porta = 00b;
while(1){
switch(portb)
{
case 100b: porta = 10b;break;
case 110b: porta = 10b;break;
case 010b: porta = 11b;break;
case 011b: porta = 01b;break;
case 001b: porta = 01b;break;
case 000b: porta = 00b;break;
case 111b: porta = 00b;break;
}
}
}
this program will work for a line follower robot? or i should use intrerupts? i didn't build my programmer yet and i can't test it...

trisb from line sensors and trisa to motors
UnD3aD is offline   Reply With Quote
Old 29th March 2005, 07:47 PM   (permalink)
New Member
strombom is on a distinguished road
Send a message via ICQ to strombom
Default

it could work, but if i were you i would try to use control theory to get smooth operation:

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

/Johan
strombom is offline   Reply With Quote
Old 23rd October 2007, 08:13 AM   (permalink)
Experienced Member
forever99482 is on a distinguished road
Send a message via MSN to forever99482
Default

you should use interrupt to enable the robot to change the speed of each wheel, that way you'd get smoother turnings
forever99482 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes




All times are GMT. The time now is 05:46 AM.


Electronic Circuits  |  Radio Controlled
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.