Thanks again to @Costas for the Blymk Magic. I extended my tests to 3 remote controls i use in my home, This remote i am sharing is the FULL Button version of the small MP3 remotes you can buy on ebay based on NEC Codes, i will upload a photo of the remote and a QR Code for the App and the Arduino sketch to make it all work. My sketch is based upon my own local blynk server so you may need to modify the sketch accordingly. The sketch is based upon using the cheapest ESP-01 module, so the PIN i am using is GPIO2, in the sketch it is this line
`IRsend irsend(2); //an IR emitter led is connected to GPIO pin 2
The physical LED hardware side comprises of a 5v wall adaptor and a proto board using a AMS1117 3.3V SOT223 voltage regulator, a 330 ohm resistor and a 2N3904 NPN Transistor and a 940NM IR LED. This arrangement is needed only if using the ESP-01 module so to eliminate it entering flash mode when starting up.
Please remember to ensure the IR LED is pointing at what ever device you are using in conjunction with your IR Receiver.
Library used /IRremoteESP8266
Arduino Sketch:-
/*
* IRremoteESP8266: IRsendGCDemo - demonstrates sending Global Cache-formatted IR codes with IRsend
* An IR LED must be connected to ESP8266 pin 2
* Version 0.1 30 March, 2016
* Based on Ken Shirriff's IrsendDemo Version 0.1 July, 2009, Copyright 2009 Ken Shirriff, http://arcfn.com
*/
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <IRremoteESP8266.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "********************";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "********************";
char pass[] = "********************";
char server[] = "********************";
// Codes are in Global Cache format less the emitter ID and request ID. These codes can be found in GC's Control Tower database.
IRsend irsend(2); //an IR emitter led is connected to GPIO pin 2
void setup()
{
irsend.begin();
Serial.begin(115200, SERIAL_8N1, SERIAL_TX_ONLY);
Blynk.begin(auth, ssid, pass, server);
// You can also specify server:
//Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 8442);
//Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8442);
}
BLYNK_WRITE(V1){
int onoff = param.asInt();
if(onoff == 1){
irsend.sendNEC(0xFFA25D, 32); // 32 bits, no repeat
}
}
BLYNK_WRITE(V2){
int mode = param.asInt();
if(mode == 1){
irsend.sendNEC(0xFF629D, 32); // 32 bits, no repeat
}
}
BLYNK_WRITE(V3){
int mute = param.asInt();
if(mute == 1){
irsend.sendNEC(0xFFE21D, 32); // 32 bits, no repeat
}
}
BLYNK_WRITE(V4){
int volup = param.asInt();
if(volup == 1){
irsend.sendNEC(0xFF906F, 32); // 32 bits, no repeat
}
}
BLYNK_WRITE(V5){
int voldown = param.asInt();
if(voldown == 1){
irsend.sendNEC(0xFFA857, 32); // 32 bits, no repeat
}
}
BLYNK_WRITE(V6){
int skipb = param.asInt();
if(skipb == 1){
irsend.sendNEC(0xFF02FD, 32); // 32 bits, no repeat
}
}
BLYNK_WRITE(V7){
int skipf = param.asInt();
if(skipf == 1){
irsend.sendNEC(0xFFC23D, 32); // 32 bits, no repeat
}
}
BLYNK_WRITE(V8){
int shuffle = param.asInt();
if(shuffle == 1){
irsend.sendNEC(0xFF9867, 32); // 32 bits, no repeat
}
}
BLYNK_WRITE(V12){
int play = param.asInt();
if(play == 1){
irsend.sendNEC(0xFF22DD, 32); // 32 bits, no repeat
}
}
BLYNK_WRITE(V13){
int usd = param.asInt();
if(usd == 1){
irsend.sendNEC(0xFFB04F, 32); // 32 bits, no repeat
}
}
BLYNK_WRITE(V14){
int eq = param.asInt();
if(eq == 1){
irsend.sendNEC(0xFFE01F, 32); // 32 bits, no repeat
}
}
BLYNK_WRITE(V15){
int ch0 = param.asInt();
if(ch0 == 1){
irsend.sendNEC(0xFF6897, 32); // 32 bits, no repeat
}
}
BLYNK_WRITE(V16){
int ch1 = param.asInt();
if(ch1 == 1){
irsend.sendNEC(0xFF30CF, 32); // 32 bits, no repeat
}
}
BLYNK_WRITE(V17){
int ch2 = param.asInt();
if(ch2 == 1){
irsend.sendNEC(0xFF18E7, 32); // 32 bits, no repeat
}
}
BLYNK_WRITE(V18){
int ch3 = param.asInt();
if(ch3 == 1){
irsend.sendNEC(0xFF7A85, 32); // 32 bits, no repeat
}
}
BLYNK_WRITE(V19){
int ch4 = param.asInt();
if(ch4 == 1){
irsend.sendNEC(0xFF10EF, 32); // 32 bits, no repeat
}
}
BLYNK_WRITE(V20){
int ch5 = param.asInt();
if(ch5 == 1){
irsend.sendNEC(0xFF38C7, 32); // 32 bits, no repeat
}
}
BLYNK_WRITE(V21){
int ch6 = param.asInt();
if(ch6 == 1){
irsend.sendNEC(0xFF5AA5, 32); // 32 bits, no repeat
}
}
BLYNK_WRITE(V22){
int ch7 = param.asInt();
if(ch7 == 1){
irsend.sendNEC(0xFF42BD, 32); // 32 bits, no repeat
}
}
BLYNK_WRITE(V23){
int ch8 = param.asInt();
if(ch8 == 1){
irsend.sendNEC(0xFF4AB5, 32); // 32 bits, no repeat
}
}
BLYNK_WRITE(V24){
int ch9 = param.asInt();
if(ch9 == 1){
irsend.sendNEC(0xFF52AD, 32); // 32 bits, no repeat
}
}
void loop() {
Blynk.run();
}
MP3 REMOTE CONTROL:-
BLYNK QR CODE:-
APP SCREENSHOT:-
-