2019NHK_teamA_auto_measuring wheel
Dependencies: QEI R1370MeasuringWheel
measuring_wheel.h
- Committer:
- tanabe2000
- Date:
- 2018-08-27
- Revision:
- 3:30045028d27e
- Parent:
- 2:f34a22b28ac5
- Child:
- 7:e74a1688680d
- Child:
- 8:8ea251946b2a
File content as of revision 3:30045028d27e:
#ifndef MEASURING_WHEEL_H #define MEASURING_WHEEL_H #include "mbed.h" #include "QEI.h" #include "R1370.h" //#include "OmniPosition.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(); void transmissionXY(); float getWheel1(),getWheel2(),getWheel3(); float getjyroAngle(); // OmniPosition r1370; private : float diameter[3]; float radian[3]; float wheel[3],r,X,Y,subX,subY; void computeXY(); void threadloop(); QEI w1; QEI w2; QEI w3; R1370 r1370; float Cdif, yaw, yawdegree; // Ticker ticker; Thread thread; uint16_t X_, Y_,ofsetX, ofsetY, yawdegree_; char upBitX, upBitY, upBitAngle; char downBitX,downBitY, downBitAngle; Serial mainMicon; char get; DigitalOut led; void resetposition(); // unsigned char upBitangle down; // void rawAngle(); }; #endif