Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Ultrasonic.h>
- Ultrasonic ultrasonic(12,11); // (Trig PIN,Echo PIN)
- void setup() {
- Serial.begin(9600);
- void loop()
- {
- Serial.print(ultrasonic.distanceRead(CM)); // CM or INC
- Serial.println(" cm" );
- delay(100);
- }
Add Comment
Please, Sign In to add comment