MBEDテスト

Dependencies:   Motor PID mbed

Registar.h

Committer:
kikoaac
Date:
2015-07-21
Revision:
2:1194c29429bf
Parent:
0:5af71b978fb7

File content as of revision 2:1194c29429bf:

#include "mbed.h"
#include "Defines.h"
#define RED 0x01
#define GREEN 0x02
#define BLUE 0x04
SPISlave *spi;
I2CSlave *i2c;
DigitalIn *Mode;
BusIn *Address;




#define MotorMode        0x04
#define MotorState        0x0e
#define Who_am_I          0x2
#define MotorPWM          0x10
#define MotorPWM2          0xf
#define MoterRevolutionL   0x11
#define MoterRevolutionH   0x12
#define MoterPulseL 0x13
#define MoterPulseH 0x14
#define MoterSpeedL 0x15
#define MoterSpeedH 0x16
#define Automatic   0x0
#define MotorP 0x30
#define MotorI 0x31
#define MotorD 0x32
#define FinishAuto 0x00
#define TargetSpeed 0x23
#define TargetAngle2 0x22
#define TargetAngle 0x21
#define TargetSpeed2 0x24
#define PulsePerRev 0x18
#define PulsePerRev2 0x19
#define PulsePerRevolutionL 0x25
#define PulsePerRevolutionH 0x26
#define PulsePerSec 0x27
#define PulsePerSec2 0x28
#define PulsePerAngle 0x20
#define RotateMode  0x17