the fish that looks like a jet
Dependencies: ADXL345 ADXL345_I2C IMUfilter ITG3200 mbed Servo
PwmReader.h
00001 #pragma once 00002 #include "mbed.h" 00003 00004 class PwmReader 00005 { 00006 public: 00007 PwmReader(); 00008 PwmReader(PinName pwmInPort, float min = 0.0, float max = 1.0); 00009 ~PwmReader(); 00010 00011 float getDuty(); //0 to 1 00012 00013 protected: 00014 void pwmRise(); 00015 void pwmFall(); 00016 void pwmRise2(); 00017 void pwmFall2(); 00018 00019 private: 00020 InterruptIn* di; 00021 int lastRise; 00022 int period; 00023 float duty; 00024 Timer t; 00025 float pwmMin; 00026 float pwmMax; 00027 00028 };
Generated on Mon Jul 25 2022 21:18:46 by 1.7.2