Pathfinding nach rechts funktioniert noch nicht...der rest schon

Dependencies:   mbed

Fork of MicroMouse_MASTER_THREE by PES2_R2D2.0

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers EncoderCounter.h Source File

EncoderCounter.h

00001 /*
00002  * EncoderCounter.h
00003  * Copyright (c) 2018, ZHAW
00004  * All rights reserved.
00005  */
00006 
00007 #ifndef ENCODER_COUNTER_H_
00008 #define ENCODER_COUNTER_H_
00009 
00010 #include <cstdlib>
00011 #include <mbed.h>
00012 
00013 /**
00014  * This class implements a driver to read the quadrature
00015  * encoder counter of the STM32 microcontroller.
00016  */
00017 class EncoderCounter
00018 {
00019 
00020 public:
00021 
00022     EncoderCounter(PinName a, PinName b);
00023     virtual     ~EncoderCounter();
00024     void        reset();
00025     void        reset(short offset);
00026     short       read();
00027     operator short();
00028 
00029 private:
00030 
00031     TIM_TypeDef*    TIM;
00032 };
00033 
00034 #endif /* ENCODER_COUNTER_H_ */