Avion Radio IUT / Mbed 2 deprecated MecatroPWM

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers codeurs.h Source File

codeurs.h

00001 #ifndef _CODEURS_H
00002 #define _CODEURS_H
00003 
00004 #include "mbed.h"
00005 
00006 class Codeurs {
00007     public:
00008         Codeurs(PinName sda = D4, PinName scl = D5, int address = 0x20);
00009         bool test();
00010         void reset();
00011         void read16(int16_t &gauche, int16_t &droit);
00012         void read(int32_t &gauche, int32_t &droit);
00013     private:
00014         I2C _i2c;
00015         int _address;
00016         int32_t _gauche, _droit;
00017         int16_t _g16, _d16;
00018 };
00019 
00020 #endif