arduino-heatpumpir/SamsungHeatpumpIR.h

43 lines
1.4 KiB
C
Raw Normal View History

2014-04-08 15:42:31 +08:00
/*
Samsung AQV12PSBN / AQV09ASA heatpump control (remote control P/N zzz)
2014-04-08 15:42:31 +08:00
*/
#ifndef SamsungHeatpumpIR_h
#define SamsungHeatpumpIR_h
#include <HeatpumpIR.h>
// Samsung timing constants
2014-05-03 18:19:37 +08:00
#define SAMSUNG_AIRCON1_HDR_MARK 3000
2014-04-08 15:42:31 +08:00
#define SAMSUNG_AIRCON1_HDR_SPACE 9000
2014-05-03 18:19:37 +08:00
#define SAMSUNG_AIRCON1_BIT_MARK 500
#define SAMSUNG_AIRCON1_ONE_SPACE 1500
#define SAMSUNG_AIRCON1_ZERO_SPACE 500
#define SAMSUNG_AIRCON1_MSG_SPACE 2000
2014-04-08 15:42:31 +08:00
// Samsung codes
#define SAMSUNG_AIRCON1_MODE_AUTO 0x00 // Operating mode
#define SAMSUNG_AIRCON1_MODE_HEAT 0x40
#define SAMSUNG_AIRCON1_MODE_COOL 0x10
#define SAMSUNG_AIRCON1_MODE_DRY 0x20
#define SAMSUNG_AIRCON1_MODE_FAN 0x30
#define SAMSUNG_AIRCON1_MODE_OFF 0xC0 // Power OFF
#define SAMSUNG_AIRCON1_MODE_ON 0xF0 // Power ON
2014-04-08 15:42:31 +08:00
#define SAMSUNG_AIRCON1_FAN_AUTO 0x01 // Fan speed
#define SAMSUNG_AIRCON1_FAN1 0x05 // * low
#define SAMSUNG_AIRCON1_FAN2 0x09 // * med
#define SAMSUNG_AIRCON1_FAN3 0x0B // * high
2014-04-16 15:35:03 +08:00
#define SAMSUNG_AIRCON1_VS_SWING 0xAE // Vertical swing
#define SAMSUNG_AIRCON1_VS_AUTO 0xFE
2014-04-08 15:42:31 +08:00
class SamsungHeatpumpIR : public HeatpumpIR
{
public:
SamsungHeatpumpIR();
void send(IRSender& IR, byte powerModeCmd, byte operatingModeCmd, byte fanSpeedCmd, byte temperatureCmd, byte swingVCmd, byte swingHCmd);
private:
2014-04-16 15:35:03 +08:00
void sendSamsung(IRSender& IR, byte powerMode, byte operatingMode, byte fanSpeed, byte temperature, byte swingV);
2014-04-08 15:42:31 +08:00
};
#endif