PARTYYYY

Dependencies:   mbed MMA8452

Accelerometre.cpp

Committer:
ThierryLeonard
Date:
2017-09-04
Revision:
2:3576839565ae
Parent:
0:c2282db9d19e
Child:
5:70db90b673b9

File content as of revision 2:3576839565ae:

#include "Accelerometre.h"

/*


int Accelerometre::readSingleByte(int regis){
    char cmd[8];
    int c;
    pc.printf("Reading single byte\n");  
    i2c.start();
    int a=i2c.write(0x38);  // A write to device
    i2c.write(regis); // Register to read from (acceleration in X)
    i2c.start();        // Need to send start condition here
    i2c.write(0x39); // tell devide you want to read
    c=i2c.read(0);      
    i2c.stop();
    pc.printf("value is %d\n", c);
    pc.printf("end\n");
    return c;
    }*/