-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsensor_feedback.h
28 lines (20 loc) · 1.03 KB
/
sensor_feedback.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef SENSOR_FEEDBACK_H
#define SENSOR_FEEDBACK_H
#include <stdint.h>
#include "Adafruit_VL53L0X.h"
#include <Adafruit_Sensor.h>
#include <Adafruit_BNO055.h>
float get_yaw_reading(Adafruit_BNO055& imu);
float get_pitch_reading(Adafruit_BNO055& imu);
uint16_t get_tof_dist_reading(Adafruit_VL53L0X& tof);
uint16_t get_tof_dist_reading_avg(Adafruit_VL53L0X& tof);
void setup_ultrasonic(const int tirg_pin, const int echo_pin);
uint16_t get_ultrasonic_reading(const int tirg_pin, const int echo_pin);
uint16_t get_ultrasonic_reading_max(const int tirg_pin, const int echo_pin);
uint16_t get_ultrasonic_reading_moving_avg(const int trig_pin, const int echo_pin);
uint16_t get_ultrasonic_reading_midpoint(const int trig_pin, const int echo_pin);
bool is_pole_detected_old(const int trig_pin, const int echo_pin);
bool is_pole_detected(const int trig_pin, const int echo_pin);
bool is_pole_detected_filtered(const int trig_pin, const int echo_pin);
bool is_pole_detected_sorted(const int trig_pin, const int echo_pin);
#endif