The example IR server part goes like this
[/void handleRoot() {
server.send(200, "text/html",
"<html>" \
"<head><title>ESP8266 Demo</title></head>" \
"<body>" \
"<h1>Hello from ESP8266, you can send NEC encoded IR" \
"signals from here!</h1>" \
"<p><a href=\"ir?code=16769055\">Send 0xFFE01F</a></p>" \
"<p><a href=\"ir?code=16429347\">Send 0xFAB123</a></p>" \
"<p><a href=\"ir?code=16771222\">Send 0xFFE896</a></p>" \
"</body>" \
"</html>");
}
void handleIr() {
for (uint8_t i = 0; i < server.args(); i++) {
if (server.argName(i) == "code") {
uint32_t code = strtoul(server.arg(i).c_str(), NULL, 10);
irsend.sendNEC(code, 32);
}
}code]
I am using Panasonic which is totally different format
Irsend.Panasonic(address in hex , code in hex) like (0x4004,0x0100BCBD) which works !!!!
my code is like this:
[code]void handleRoot() {
server.send(200, "text/html",
"<html>" \
"<head><title>ESP8266 Demo</title></head>" \
"<body>" \
"<h2>Hello from ESP8266, you can send Panasonic encoded IR" \
"signals from here!</h2>" \
"<h1><a href=\"ir?code=0x0100bcbd\">Send PowerON</a></h1>" \
"<h1><a href=\"ir?code=0x0100bcbd\">Send PowerOff</a></h1>" \
"<h1><a href=\"ir?code=0x0100bcbd\">Send VolumeUP</a></h1" \
"</body>" \
"</html>");
}
void handleIr() {
for (uint8_t i = 0; i < server.args(); i++) {
if (server.argName(i) == "code") {
String code = strtoul(server.arg(i).c_str(), NULL, 10); // my very amateurish mod.
irsend.sendPanasonic(0x4004, code);
}
}
To avoid your possible wrong take that it is IRremote issue that needs delving in, It is NOT. It is purely programming issue. Let me expand:
The example code is assuming a numeric field for the code, mine is hex as shown in my version.
This is causing compiling issues of mismatch
The statement irsend.Panasonic(0x4004, 0x0100BCBD); works !!!!! if I do this:
[codevoid handleIr() {
for (uint8_t i = 0; i < server.args(); i++) {
if (server.argName(i) == "code") {
uint32_t code = strtoul(server.arg(i).c_str(), NULL, 10);
irsend.sendPanason(0x4004,0x0100BCBD); // the change I made and it works
}][/code]
I hope you see the problem, and also hope that you agree it is programming problem of data type mismatch
your support will be greatly appreciated