that_one_nigga_you_k

teste do sonar

Mar 8th, 2018
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.24 KB | None | 0 0
  1. #include <Ultrasonic.h>
  2.  
  3.  Ultrasonic ultrasonic(12,11); // (Trig PIN,Echo PIN)
  4. void setup() {
  5.   Serial.begin(9600);
  6.  
  7.  
  8. void loop()
  9. {
  10.   Serial.print(ultrasonic.distanceRead(CM)); // CM or INC
  11.   Serial.println(" cm" );
  12.   delay(100);
  13. }
Add Comment
Please, Sign In to add comment