Codeurs MECATRO

Dependencies:   mbed

codeurs.h

Committer:
iut_cachan01
Date:
2021-03-24
Revision:
0:f462be86dc4a

File content as of revision 0:f462be86dc4a:

#ifndef _CODEURS_H
#define _CODEURS_H

#include "mbed.h"

class Codeurs {
    public:
        Codeurs(PinName sda = D4, PinName scl = D5, int address = 0x20);
        bool test();
        void reset();
        void read16(int16_t &gauche, int16_t &droit);
        void read(int32_t &gauche, int32_t &droit);
    private:
        I2C _i2c;
        int _address;
        int32_t _gauche, _droit;
        int16_t _g16, _d16;
};

#endif