Created
October 18, 2018 02:15
-
-
Save axelerator/c6eef515da9149b12fe04b7728b8d9a1 to your computer and use it in GitHub Desktop.
Customize play function to support different frequencies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void handlePlay() { | |
String response = "POSTED"; | |
response += server.arg("timings"); | |
readCSV(server.arg("timings")); | |
for (int i = 0; i < current_data_length; ++i) { | |
Serial.println(signal_data[i]); | |
} | |
int frequency = server.arg("frequency").toInt(); | |
irsend.sendRaw(signal_data, current_data_length, frequency); // Send a raw data capture at frequency given as request parameter. | |
server.sendHeader("Access-Control-Allow-Origin", "*"); | |
server.send(200, "text/plain", response); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/axelerator/esp8266_ir_blaster