19 lines
243 B
C
19 lines
243 B
C
|
#ifndef ULTRASOUND_H
|
||
|
#define ULTRASOUND_H
|
||
|
|
||
|
#include <Arduino.h>
|
||
|
|
||
|
struct UltrasonicPin
|
||
|
{
|
||
|
int trig;
|
||
|
int echo;
|
||
|
};
|
||
|
|
||
|
struct Ultrasonic
|
||
|
{
|
||
|
static UltrasonicPin pin;
|
||
|
static void init(UltrasonicPin pin);
|
||
|
static float getDistance();
|
||
|
};
|
||
|
|
||
|
#endif
|