Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Customize play function to support different frequencies
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);
}
@axelerator

This comment has been minimized.

Copy link
Owner Author

axelerator commented Oct 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.