renamed source code and completed iris kit auth procedure
This commit is contained in:
@@ -1,50 +0,0 @@
|
||||
// Copyright 2017 Jonny Graham, 2018 David Conran
|
||||
#ifndef UNIT_TEST
|
||||
#include <Arduino.h>
|
||||
#endif
|
||||
#include <IRremoteESP8266.h>
|
||||
#include <IRsend.h>
|
||||
#include <ir_Fujitsu.h>
|
||||
|
||||
const uint16_t kIrLed = 4; // ESP8266 GPIO pin to use. Recommended: 4 (D2).
|
||||
IRFujitsuAC ac(kIrLed);
|
||||
|
||||
void printState() {
|
||||
// Display the settings.
|
||||
Serial.println("Fujitsu A/C remote is in the following state:");
|
||||
Serial.printf(" %s\n", ac.toString().c_str());
|
||||
// Display the encoded IR sequence.
|
||||
unsigned char* ir_code = ac.getRaw();
|
||||
Serial.print("IR Code: 0x");
|
||||
for (uint8_t i = 0; i < ac.getStateLength(); i++)
|
||||
Serial.printf("%02X", ir_code[i]);
|
||||
Serial.println();
|
||||
}
|
||||
|
||||
void setup() {
|
||||
ac.begin();
|
||||
Serial.begin(115200);
|
||||
delay(200);
|
||||
|
||||
// Set up what we want to send. See ir_Fujitsu.cpp for all the options.
|
||||
Serial.println("Default state of the remote.");
|
||||
printState();
|
||||
Serial.println("Setting desired state for A/C.");
|
||||
ac.setCmd(kFujitsuAcCmdTurnOn);
|
||||
ac.setSwing(kFujitsuAcSwingBoth);
|
||||
ac.setMode(kFujitsuAcModeCool);
|
||||
ac.setFanSpeed(kFujitsuAcFanHigh);
|
||||
ac.setTemp(24); // 24C
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// Now send the IR signal.
|
||||
Serial.println("Sending IR command to A/C ...");
|
||||
#if SEND_FUJITSU_AC
|
||||
ac.send();
|
||||
#else // SEND_FUJITSU_AC
|
||||
Serial.println("Can't send because SEND_FUJITSU_AC has been disabled.");
|
||||
#endif // SEND_FUJITSU_AC
|
||||
printState();
|
||||
delay(5000);
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
[platformio]
|
||||
lib_extra_dirs = ../../
|
||||
src_dir=.
|
||||
|
||||
[common]
|
||||
build_flags =
|
||||
lib_deps_builtin =
|
||||
lib_deps_external =
|
||||
|
||||
[env:nodemcuv2]
|
||||
platform = espressif8266
|
||||
framework = arduino
|
||||
board = nodemcuv2
|
||||
build_flags = ${common.build_flags}
|
||||
lib_deps =
|
||||
${common.lib_deps_builtin}
|
||||
${common.lib_deps_external}
|
||||
Reference in New Issue
Block a user