Robot
Embed:
(wiki syntax)
Show/hide line numbers
Sensor.h
00001 #ifndef SENSOR_H 00002 #define SENSOR_H 00003 #include "mbed.h" 00004 #include "QEI/QEI.h" 00005 using namespace std; 00006 class Sensor { 00007 private: 00008 float rank; 00009 float scale_factor; 00010 float offset; 00011 float value; 00012 QEI Encoder; 00013 public: 00014 Sensor(PinName channelA,PinName channelB,float _rank, float _sFactor,float _offset, int _pulsesPerRev); 00015 float readSensor(); 00016 float computevalue(int value); 00017 float estimatevelocity (float prevValue,float sampling); 00018 }; 00019 #endif //SENSOR_H
Generated on Thu Jul 14 2022 08:46:33 by
1.7.2