This is an old revision of the document!


Lahendused harjutustele

Harjutus 2.1
#include <pololu/3pi.h>
 
int main()
{
  delay_ms(3000);
    while(1)
    {
      for(int i = 0; i < 4; i++){
        set_motors(50,50);
        delay_ms(500);
        set_motors(0,50);
        delay_ms(680);
      }
      set_motors(0,0);
      delay_ms(5000);
    }
}
Harjutus 2.2
#include <pololu/3pi.h>
 
int main()
{
	delay_ms(3000);
	while(1)
	{
 
		set_motors(50,50);
		delay_ms(500);
		set_motors(0,50);
		delay_ms(2200);
		set_motors(50,50);
		delay_ms(500);
		set_motors(50,0);
		delay_ms(2200);	
		set_motors(0,0);
		delay_ms(2000);
        }
}
et/projects/3pi/solutions.1446717925.txt.gz · Last modified: 2020/07/20 09:00 (external edit)
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0