ss
Dependencies: WS2812 PixelArray Adafruit_GFX
IRreflection.h
00001 #ifndef TRSensors_h 00002 #define TRSensors_h 00003 00004 #include "mbed.h" 00005 #define NUMSENSORS 5 00006 00007 class TRSensors 00008 { 00009 public: 00010 00011 TRSensors(PinName MOSI,PinName MISO, PinName CLK, PinName CS); 00012 00013 void calibrate_init(int *calibratedMin, int *calibratedMax); 00014 00015 void calibrate(int *sensor_values, int *calibratedMin, int *calibratedMax); 00016 00017 void AnalogRead(int *sensor_values); 00018 00019 void readCalibrated(int *sensor_values, int *calibratedMin, int *calibratedMax); 00020 00021 int readLine(int *sensor_values , int *calibratedMin, int *calibratedMax, int *online, char white_line = 0); 00022 00023 int sqrt(int m, int k); 00024 00025 char _numSensors; 00026 int max_sensor_values[NUMSENSORS]; 00027 int min_sensor_values[NUMSENSORS]; 00028 00029 private: 00030 SPI _spi; 00031 DigitalOut _spi_cs; 00032 00033 }; 00034 00035 #endif
Generated on Sun Jul 17 2022 05:22:18 by 1.7.2