![]() |
MatrixMiniR4 1.1.5
Matrix Mini R4 Arduino Library API Documentation
|
A class for interfacing with Grove Ultrasonic Ranger. More...
#include <MiniR4_Grove_US.h>
Public Member Functions | |
MiniR4_Grove_US () | |
long | MeasureInCentimeters (uint32_t timeout=1000000L) |
Measures the distance in centimeters. | |
long | MeasureInMillimeters (uint32_t timeout=1000000L) |
Measures the distance in millimeters. | |
long | MeasureInInches (uint32_t timeout=1000000L) |
Measures the distance in inches. | |
A class for interfacing with Grove Ultrasonic Ranger.
This class allows measuring distances in centimeters, millimeters, and inches using the Grove Ultrasonic Ranger sensor. It works by sending ultrasonic pulses and measuring the time taken for the pulse to return.
PIN1 | Unused pin (for future use). |
PIN2 | Pin number where the sensor is connected. |
Definition at line 69 of file MiniR4_Grove_US.h.
|
inline |
Definition at line 72 of file MiniR4_Grove_US.h.
|
inline |
Measures the distance in centimeters.
timeout | Timeout in microseconds (default: 1 second). |
Definition at line 82 of file MiniR4_Grove_US.h.
|
inline |
Measures the distance in inches.
timeout | Timeout in microseconds (default: 1 second). |
Definition at line 106 of file MiniR4_Grove_US.h.
|
inline |
Measures the distance in millimeters.
timeout | Timeout in microseconds (default: 1 second). |
Definition at line 94 of file MiniR4_Grove_US.h.