Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <ipst.h>
- word L,R,speed;
- void setup(){
- OK();
- glcdFillScreen(GLCD_SKY);
- setTextSize(3);
- setTextBackgroundColor(GLCD_SKY);
- setTextColor(GLCD_WHITE);
- glcd(0,0,"IPST-SE");
- setTextColor(GLCD_YELLOW);
- glcd(1,0,"MicroBOX");
- setTextSize(2);
- setTextBackgroundColor(GLCD_YELLOW);
- setTextColor(GLCD_BLACK);
- glcd(4,0,"Line Tracing");
- }
- void loop(){
- L=analog(1);R=analog(2);speed=knob(100);
- if(L>850&&R>850){fd(speed);}
- else if (L<850&&R>850){while(analog(1)<850){sl(speed);}}
- else if (L>850&&R<850){while(analog(2)<850){sr(speed);}}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement