まだ使えません
Dependencies: QEI OmniPosition
Diff: measuring_wheel.h
- Revision:
- 0:505dd5510add
- Child:
- 1:3f01bf4d7e56
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/measuring_wheel.h Mon Jul 02 08:38:07 2018 +0000 @@ -0,0 +1,52 @@ +#ifndef MEASURING_WHEEL_H +#define MEASURING_WHEEL_H + +#include "mbed.h" +#include "QEI.h" +#define PI 3.141592653589793 + +class MeasuringWheel +{ +public : + MeasuringWheel(PinName channel1_1, PinName channel1_2, PinName channel2_1, PinName channel2_2, PinName channel3_1, PinName channel3_2); +// bool + + bool wheelDiameter(float diameter1, float diameter2, float diameter3); + + float getOutX(); + float getOutY(); + + +private : + float diameter[3]; + float radian[3]; + float wheel[3],r,X,Y; + void computeXY(); + + + QEI w1; + QEI w2; + QEI w3; + Ticker ticker; + +}; + + +class TransmissionXY +{ + +public: + TransmissionXY(PinName serialTX, PinName serialRX); + bool sendMeasuring( MeasuringWheel &request); + void resetpisithon(); +private: + + uint16_t X_, Y_,ofsetX, ofsetY; + char upBitX, upBitY; + char downBitX,downBitY; + Serial mainMicon; + char get; + DigitalOut led; + +}; +#endif \ No newline at end of file