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.
Dependents: R1Arobo_Maika_B 2021Arobo_UMAPYOI 2021Arobo_YUMIPYOI
Serial6050.h
- Committer:
- Suzutomo
- Date:
- 2019-09-18
- Revision:
- 4:413d60ebdcf2
- Parent:
- 2:00a8daf9203b
File content as of revision 4:413d60ebdcf2:
#pragma once
#include "mbed.h"
#define ERROR -10000
enum axis {
YAW,
PITCH,
ROLL
};
class Serial6050
{
private:
RawSerial serial;
DigitalOut rst;
int resetValue;
int Bias;
void intReceive();
bool useResetPin;
public:
Serial6050(PinName tx, PinName rx, PinName resetPin);
void init();
void reset();
volatile uint8_t data;
volatile int Deg;
float read();
};