David's dead reckoning code for the LVBots competition on March 6th. Uses the mbed LPC1768, DRV8835, QTR-3RC, and two DC motors with encoders.

Dependencies:   PololuEncoder Pacer mbed GeneralDebouncer

l3g.h

Committer:
DavidEGrayson
Date:
14 months ago
Revision:
48:597738b77f77
Parent:
42:96671b71aac5

File content as of revision 48:597738b77f77:

#pragma once

// Returns 0 for success, non-zero for error.
int32_t l3gInit();
int32_t l3gReadReg(char reg);
int32_t l3gWriteReg(char reg, char value);
int32_t l3gZRead();
int32_t l3gZAvailable();

// Takes one reading and record it for the purposes of zero-rate calibrations.
// Returns the reading just in case you want it for something.
int32_t l3gCalibrate();

bool l3gCalibrateDone();

void l3gCalibrateReset();

int32_t l3gZReadCalibrated();