DPRG List  

[DPRG] AT90C2313-10PI for a line follower?

Subject: [DPRG] AT90C2313-10PI for a line follower?
From: Balter Wiggin manny132 at hotmail.com
Date: Sat Jul 15 15:53:52 CDT 2006

As my next intended project, the bicycle computer was scrubbed because of 
funding issues, i thought i would refine my line follower design while still 
retaining my objective of using a microcontroller to increase precision. 
I've snapped up a little bit of code that i think should work, but im not 
quite sure. Trisb would be an input of three line sensors: left, middle, and 
right respectively. Porta would be connected to two motors, the left half to 
the left, and the right half to the right. This approach at motor control 
would allow two settings on the pager motors that i salvaged. Note that I'm 
still learning to program.

#include <system.h>

void main()
trisa = 0000b;
trisb = 111b;
porta = 0000b;
case 101b: porta = 1111b;break;
case 110b: porta = 1110b;break;
case 011b: porta = 0111b;break;
case 001b: porta = 0110b;break;
case 100b: porta = 0110b;break;
case 000b: porta = 0000b;break;
case 111b: porta = 0000b;break;
while (0 < 1);


Express yourself instantly with MSN Messenger! Download today - it's FREE! 

More information about the DPRG mailing list