31 #define PF_Commmand 0x41
33 #define PF_Channel 0x42
34 #define PF_Channel_1 1
35 #define PF_Channel_2 2
36 #define PF_Channel_3 3
37 #define PF_Channel_4 4
39 #define PF_Control 0x43
40 #define PF_Contol_Both 0
44 #define PF_Speed_A 0x45
45 #define PF_Speed_B 0x47
46 #define PF_Speed_Slow 1
47 #define PF_Speed_Medium 4
48 #define PF_Speed_Full 7
50 #define PF_Operation_A 0x44
51 #define PF_Operation_B 0x46
52 #define PF_Operation_Float 0
53 #define PF_Operation_Forward 1
54 #define PF_Operation_Reverse 2
55 #define PF_Operation_Brake 3
57 #include "NXShieldI2C.h"
66 PFMate(uint8_t i2c_address = 0x48);
75 void controlMotor(uint8_t channel, uint8_t contol, uint8_t operation, uint8_t speed);
This class implements I2C interfaces used by NXShield.
Definition: NXShieldI2C.h:32
bool setSpeedB(uint8_t speed)
Definition: PFMate.cpp:71
bool setOperationB(uint8_t operation)
Definition: PFMate.cpp:61
bool sendSignal()
Definition: PFMate.cpp:41
bool setChannel(uint8_t channel)
Definition: PFMate.cpp:46
uint8_t issueCommand(char command)
Definition: PFMate.cpp:36
void controlMotor(uint8_t channel, uint8_t contol, uint8_t operation, uint8_t speed)
Definition: PFMate.cpp:76
PFMate(uint8_t i2c_address=0x48)
Definition: PFMate.cpp:32
This class interfaces with PFMate attached to NXShield.
Definition: PFMate.h:62
bool setOperationA(uint8_t operation)
Definition: PFMate.cpp:56
bool setSpeedA(uint8_t speed)
Definition: PFMate.cpp:66
bool setControl(uint8_t contol)
Definition: PFMate.cpp:51