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.
Dependencies: ST7032 QEI PS4Serial
Dependents: 2021Arobo_UMAPYOI 2021Arobo_YUMIPYOI
cerica2.h
- Committer:
- Suzutomo
- Date:
- 2019-05-09
- Revision:
- 13:91a699eae3ea
- Parent:
- 11:8fa43cb31f9b
- Child:
- 15:f2e702d0047c
File content as of revision 13:91a699eae3ea:
#include "mbed.h"
enum WireSel {
FEP01,TweLite
};
class CERICA
{
private:
DigitalOut wireSelect;
I2C *i2c;
char ADDR;
bool brake;
bool isEnc;
bool channel;
long map(long x, long in_min, long in_max, long out_min, long out_max);
char configData;
char Div;
int minSpd;
int maxSpd;
public:
CERICA(I2C *i2c_,WireSel WireSel_);
//bool init(char toMD , bool rvs = false , bool omni = true, bool sound = false , frequency freq = F256, int channel_ = 0);
void mRange(int minSpd_,int maxSpd_);
bool motor(bool available_ = 1);
void motor(char sendChannel,int verocity);
bool RawMotor(char sendChannel,int verocity);
bool wait(int waitT);
void set(bool isEnc_ = false,bool brake_ = false,int channel_ = 0);
bool SystemReset(char sendChannel);
bool ConfigReset(char sendChannel);
bool DscOn(char sendChannel,bool mode);
bool OutputFlip(char sendChannel,bool mode);
bool DscPortOpen(char sendChannel,bool mode);
bool SoundOn(char sendChannel,bool mode);
bool SetDivider(char sendChannel,char pulse);
void SetSpeedLimit(int min, int max){ minSpd = min; maxSpd = max; }
int powerOut[16];
int power[16];
};