Multiple pin outputs (NodeMCU) #1643
Answered
by
crankyoldgit
ImDiegoMoreno
asked this question in
Q&A
-
I'm currently working on a project to send IR to a TV. I can send codes successfully to one IR led at the moment. However, I was wondering if it's possible to connect more IR LEDs on different pins and send codes to these as well. |
Beta Was this translation helpful? Give feedback.
Answered by
crankyoldgit
Oct 19, 2021
Replies: 1 comment 1 reply
-
Yes, it is. #include <Arduino.h>
#include <IRremoteESP8266.h>
#include <IRsend.h>
IRsend livingroom(4); // Control the living room devices on gpio 4)
IRsend kitchen(7); // Control the kitchen devices on gpio 7)
void setup() {
livingroom.begin();
kitchen.begin();
}
void loop() {
livingroom.sendNEC(0x00FFE01F);
delay(10000);
kitchen.sendSAMSUNG(0xE0E019E6);
delay(20000);
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
crankyoldgit
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, it is.
e.g. (pseudo code, not compiled or checked. Just for illustration.)