]> git.piffa.net Git - rover/commitdiff
Merge branch 'objects' of kim:/home/git/rover into objects objects
authorAndrea Manni <andrea@piffa.net>
Mon, 3 Apr 2017 12:32:51 +0000 (14:32 +0200)
committerAndrea Manni <andrea@piffa.net>
Mon, 3 Apr 2017 12:33:47 +0000 (14:33 +0200)
1  2 
libraries/rover/rover.cpp

index b2087284706e09d85f8feee1b298663d1a1a3dc3,b2087284706e09d85f8feee1b298663d1a1a3dc3..051a9122ff665c430458e9110a1cb29b7409607a
@@@ -48,6 -48,6 +48,17 @@@ void car::avanti () 
      analogWrite(_enB,velB);
  }
  
++void car::stop () {
++// Motor A
++    digitalWrite(_in1,LOW);
++    digitalWrite(_in2,HIGH);
++    analogWrite(_enA,0);
++// Motor B
++    digitalWrite(_in3,LOW);
++    digitalWrite(_in4,HIGH);
++    analogWrite(_enB,0);
++}
++
  
  // Funzioni