countDecko

Untitled

Aug 29th, 2019
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void setup() {
  2.     //trugva napravo dokato ne sreshtne obekt;
  3.     forward();
  4.     x = millis();
  5.     while (ne e zasechen obekt) {
  6.     }
  7.     //zapisva kolko vreme mu e otnelo da stigne ot edin rub do otsreshtniq
  8.     x = millis() - x;
  9.     stop();
  10.  
  11.     zavurtiSeNaDqsno();
  12.     forward();
  13.     y = millis();
  14.     while (ne e zasechen obekt) {
  15.     }
  16.     y = millis() - y;
  17.     stop();
  18.     //veche imame max X i max Y vuv milisekundi
  19. }
Advertisement
Add Comment
Please, Sign In to add comment