Yolanda Tania / Mbed 2 deprecated bacaencoder

Dependencies:   mbed encoderKRAI Motor_new

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers odometriKRAI.h Source File

odometriKRAI.h

00001 #ifndef ODOMETRIKRAI_H
00002 #define ODOMETRIKRAI_H
00003 
00004 #include "mbed.h"
00005 #include "encoderHAL/encoderHAL.h"
00006 #include "CMPS12_KRAI/CMPS12_KRAI.h"
00007 
00008 #ifndef COORDINATE_T
00009 #define COORDINATE_T
00010 typedef struct Coordinate_t{
00011     float x;
00012     float y;
00013     float teta;
00014 }Coordinate;
00015 #endif
00016 
00017 class odometriKRAI{
00018 
00019 public:
00020     Coordinate position;
00021     odometriKRAI(TIM_TypeDef *_TIMEncX, TIM_TypeDef *_TIMEncY, PinName SDA, PinName SCL);
00022     void resetOdom(void);
00023     void updatePosition(void);
00024     
00025 private:
00026     encoderHAL encX;
00027     encoderHAL encY;
00028     CMPS12_KRAI kompass;
00029 };
00030 
00031 
00032 #endif