Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of ISR_Mini-explorer by
Encoder.h
00001 #ifndef ENCODER_H 00002 #define ENCODER_H 00003 00004 #include "mbed.h" 00005 00006 /** Encoder class. 00007 * Manages one magnetic encoder AS5600. Reads its absolute value and performs 00008 * the conversion of the value to incremental valeu. 00009 */ 00010 class Encoder 00011 { 00012 public: 00013 Encoder(I2C* i2c_in, Mutex* mutex_in, char invert_in); 00014 long int readAbsolute(); 00015 long int incremental(); 00016 long int readIncrementalValue(); 00017 00018 private: 00019 I2C* _i2c; 00020 Mutex* _mutex; 00021 short int prev_L; 00022 long int total_L; 00023 char _invert; 00024 }; 00025 00026 #endif
Generated on Thu Jul 28 2022 17:26:36 by
1.7.2
