Hello,
I am new to Arduino and I am facing a problem in connecting tools to breadboard.
I am trying to send IR signal using NodeMCU ESP8266 and by following these steps (HERE)
and this code:
/* IR_Remote.ino per http://community.blynk.cc/t/disconnetted-nodemcu/11599 */
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <SimpleTimer.h>
// IR remote
#include <IRremoteESP8266.h>
char auth[] = "xxxx";
char ssid[] = "xxxxx";
char pass[] = "xxxxxx";
char server[] = "blynk-cloud.com";
SimpleTimer testingTimer;
IRsend irsend(0); ///an IR led is connected to GPIO 0 --> D4
// ======= SKETCH IR
int pinValueV1;
int pinValueV4;
int pinValueV5;
unsigned int ScreenUp[63] = {1400, 400, 1400, 400, 1400, 400, 1400, 400, 500, 1200, 500, 1200, 500, 1200, 500, 1200, 500, 1200, 500, 1200, 500, 1200, 1350, 400, 500, 1200, 500, 1200, 500, 1200, 1400, 400, 1400, 400, 1400, 400, 500, 1200, 1350, 400, 1350, 400, 1350, 400, 500, 1200, 1400, 400, 1400, 400, 1400, 400, 500, 1200, 1400, 400, 1400, 400, 1350, 400, 1350, 400, 500};
unsigned int ScreenDown[63] = {1400, 400, 1350, 400, 1400, 400, 1400, 400, 500, 1200, 500, 1200, 500, 1200, 500, 1200, 500, 1200, 1350, 400, 500, 1200, 500, 1200, 500, 1200, 500, 1200, 500, 1200, 1400, 400, 1400, 400, 1400, 400, 1400, 400, 550, 1200, 1350, 400, 1350, 400, 1400, 400, 550, 1200, 500, 1200, 500, 1200, 500, 1200, 1400, 400, 1400, 400, 1400, 400, 1400, 400, 1400};
BLYNK_WRITE(V2) // ON/OFF
{
int pinValue = param.asInt();
if (pinValue==1)
if ( param.asInt() && pinValueV1 == 1 ) // ON/OFF TV
irsend.sendNEC(0xE0E040BF, 32);
}
// ========LOOP
void setup()
{
Serial.begin(115200);
Serial.println();
Serial.println(F("Started"));
irsend.begin();
Blynk.begin(auth, ssid, pass, server);
Blynk.syncAll();
}
void loop()
{
Blynk.run();
testingTimer.run();
}
I believe the code is OKAY. But the problem is I don't know how to connect the tools together thought breadboard.
I have:
- IR LED
- Transistor 2n2222
- Resistor 220 OHM
- Resistor 1KB OHM
- and as I said ESP8266 and breadboard
I tried to connect it like this pic, but it didn't work with me (USING D4 AS THE CODE IS WRITTEN).
Can you plz help me.