Yes, cuz
I already provide you everthing code, hand drawn concept schematic now i dont know what you want
Above code in beginning it works fine ok i just want to add simple serial to ir transmitter
In simple words, i want to make serial command ir remote
I will add input command and send side nec code
If you can tell me what can i do to make this its really helpful for me
Tell me what you need?
My other circuit working i dont help from that side
I need help to add things in that circuit
You need schematic of how arduino and tx ir connected and what you need more
J-M-L
September 17, 2024, 6:28am
26
That’s a lot of faith in me!
The other contributors in this thread are highly skilled - you should listen to them, they are trying to help.
Can you clarify why you need two different IR Tx ? It’s not because you have two different remotes that the underlying hardware is different. They use an IR led to send a specific code, using possibly a specific encoding. You need to identify the commands from each remote (the library has a sketch to capture raw codes) and then you just need to replay those codes (I think that the library has also code for this).
kmin
September 17, 2024, 7:12am
27
Use the code in post#8 to receive signal and post here what you get in serial monitor.
@LarryD @J-M-L
IR tx connected to D9 and D8
@J-M-L yes i want to use 2 IR tx cuz some remote hex are same in both devices like brighness selection in celing light and Speed selection in fan thats why i want to use 2 IR tx.
For Sketch check Post# 1
For Schematic Check Post# 28
For How things work Check Post# 10
if you have any question please feel free to ask
cherk
September 17, 2024, 8:41am
30
Those switches will 'float" when not 'made' and either should have pulldowns or change the logic to active low !
J-M-L
September 17, 2024, 8:53am
31
The IRremote library pre-instantiate only one sender
Ideally you use only that sender object but you change the associated send pin based on which "remote" you want to control.
You could have a look at the question
opened 03:32PM - 30 Dec 23 UTC
closed 10:29PM - 31 Dec 23 UTC
Bug
### The type of board you are using.
ESP32 board - first check https://github… .com/crankyoldgit/IRremoteESP8266
### The boards name or FQBN (e.g. esp8266:esp8266:d1_mini:eesz=4M3M,xtal=80) for unspecified board.
ESP32 DEVKIT V1
### What IDE are you using?
Arduino IDE
### What IR protocol are you using?
NEC
### Pin(s) used for IR-receive, if not default.
Arduino pin number: default
### Example(s) you have checked while hunting the bug.
- [X] SimpleReceiver
- [X] ReceiveDemo
- [X] SendRawDemo
- [ ] ReceiverTimingAnalysis
- [ ] TinyReceiver
- [ ] TinySender
- [ ] ReceiveAndSend
- [X] SimpleSender
- [X] SendDemo
- [ ] SendLGAirConditionerDemo
- [ ] UnitTest
- [ ] Other - please specify below
- [X] I checked, if at least one of the examples was working.
### Example(s) to reproduce the issue.
- [ ] SimpleReceiver
- [ ] ReceiveDemo
- [X] SendRawDemo
- [ ] ReceiverTimingAnalysis
- [ ] TinyReceiver
- [ ] TinySender
- [ ] ReceiveAndSend
- [ ] SimpleSender
- [X] SendDemo
- [ ] SendLGAirConditionerDemo
- [ ] UnitTest
- [X] Other - please specify below
### The library version you are working with.
- [X] I use the [latest Arduino library version](../releases) and verified this!
- [ ] I use the latest repo version ([download link](../archive/master.zip)) and verified this!
### What are the steps to reproduce this issue?
I have a remote multiple emitter cloning project on esp32. The first emitter is on pin 18 and the second emitter is on pin 27 with the code as follows
`String msg;
const char* prontoData() {
const char* command = nullptr;
const char* command1[] PROGMEM = "0000 0067 ... ...";
const char* command2[] PROGMEM = "0000 0067 ... ...";
if (msg == "A1") {
command = commmand1;
} else if (msg == "A2") {
command = command2;
}
return command;
}
void sendData() {
const int IR_PIN_1 = 18;
const int IR_PIN_2 = 27;
int irPin = 0;
String incomingMsg;
if (msg == "A1") {
irPin = IR_PIN_1;
} else if (msg == "A2") {
irPin = IR_PIN_2;
}
IrSender.setSendPin(irPin);
irsend.sendPronto(F(prontoData()), 3U);
}`
I try to only connected the emitter on pin 27, so that when "A1" was triggered no data would be received by the receiver because the emitter was not connected to pin 18. Next I triggered "A2" so that the emitter on pin 27 could send data and the receiver was also detected Pronto data is sent because the emitter is actually connected to pin 27.
### What happens?
The problem is that when I continue this step by giving the message "A1" there should be no message belonging to A1 detected by the receiver, but the receiver detects a message belonging to A1 sent via pin 27.
### The serial output which indicates the error happened.
_No response_
### What were you expecting to happen?
My expectation with this coding is that when there is an incoming message "A1" then the emitter on pin 18 sends data belonging to A1 and if the message comes in "A2" then the emitter on pin 27 sends data belonging to A2.
### Additional context.
_No response_
### Final checklist for the bug report.
- [X] I have **read** the README.md file thoroughly
- [X] I have searched existing issues to see if there is anything I have missed.
- [X] I have browsed the examples for one, that matches my use case.
- [x] The title of the issue is helpful and relevant.
to see how the code uses IRsend::setSendPin() (and possible issue on ESP32 and the solution)
Sorry i forget to mention in schematic