Romi32U4 library
Romi32U4Encoders.h
Go to the documentation of this file.
1 // Copyright Pololu Corporation. For more information, see http://www.pololu.com/
2 
5 #pragma once
6 
7 #include <stdint.h>
8 
32 {
33 
34 public:
35 
40  static void init()
41  {
42  static bool initialized = 0;
43  if (!initialized)
44  {
45  initialized = true;
46  init2();
47  }
48  }
49 
58  static int16_t getCountsLeft();
59 
62  static int16_t getCountsRight();
63 
67  static int16_t getCountsAndResetLeft();
68 
71  static int16_t getCountsAndResetRight();
72 
85  static bool checkErrorLeft();
86 
89  static bool checkErrorRight();
90 
91 private:
92 
93  static void init2();
94 };
static bool checkErrorRight()
Reads counts from the encoders on the Romi 32U4.
static bool checkErrorLeft()
static int16_t getCountsAndResetRight()
static int16_t getCountsRight()
static int16_t getCountsLeft()
static int16_t getCountsAndResetLeft()
static void init()