![]() |
The STEAM Org Robotics Kit
v1
|
Allows to interface with a standard ultrasonic sensor. More...
#include <Ultrasonic.h>
Public Member Functions | |
| Ultrasonic (u_int8_t trig, u_int8_t echo) | |
| int | getDistance () |
| Triggers the ir sensor and gets the distance recorded by it in centimeters. More... | |
Allows to interface with a standard ultrasonic sensor.
| Ultrasonic::Ultrasonic | ( | u_int8_t | trig, |
| u_int8_t | echo | ||
| ) |
| trig | The trig pin of the ultrasonic sensor |
| echo | The echo pin of the ultrasonic sensor |
| int Ultrasonic::getDistance | ( | ) |
Triggers the ir sensor and gets the distance recorded by it in centimeters.