// IRReceiver.h // Created By: CH,Chen(Taiwan) // Created Date: 2011/12/08 // This is a class for controlling the IRReceiver sensor, made by Hitechnic. #ifndef IRReceiver_H #define IRReceiver_H #define IRRECV_CH_1A 0x42 #define IRRECV_CH_1B 0x43 #define IRRECV_CH_2A 0x44 #define IRRECV_CH_2B 0x45 #define IRRECV_CH_3A 0x46 #define IRRECV_CH_3B 0x47 #define IRRECV_CH_4A 0x48 #define IRRECV_CH_4B 0x49 #include "NXShieldI2C.h" /** @brief This class interfaces with IRReceiver attached to NXShield */ class IRReceiver : public NXShieldI2C { public: /** class constructor for the IRReceiver with optional custom i2c address parameter */ IRReceiver(uint8_t i2c_address = 0x02); /** get power level of specified channel and port @ PARM channel - PF IR channel no. 1-4 @ PARM port - PF IR control port no : A - Red/Left, B - Blue/Right */ char getPortPowerLevel(uint8_t channel, char port); /** get two ports power level of specified channel */ void getChannelPowerLevel(uint8_t channel, char &portA_PowerLevel, char &portB_PowerLevel); /** get all 4 channels 8 ports power level @param port_PowerLevel a array of power level for all 8 ports (array has 8 elements)*/ void getAllPortsPowerLevel(char *port_PowerLevel); }; #endif