Open te0203 opened 1 year ago
Hi. File 'gree_ir.h' is not for conditioner. This file is for your IR remote device. Your IR remote has only one IR transmitter, so only one transmitter pin. You can not control two ore more AC separately. IR remote send IR command, and all AC near this IR remote will receive this command.
Yes, I understand, but on each air conditioner I have my own device with a IR remote control and there are 5 of them. 5 separate ESP12E. The range of the remote control is 1.3 meters. And they are in different rooms. I understand you can write five files for each device, but this is not logical.
You can try to add new method like 'set_temp_sensor' for set pin. And call it like this: bedroom_ac->set_transmitter_pin(10);
If I could I would write, but I don't understand anything in C++. Fine. Thanks for your reply, sorry for wasting your time. I will learn C++. :))
Good afternoon again. I wrote something here, could you check it. Everything seems to be working for me. From the remote control reads and remembers. Although everything is bad with the transfer of the pin number. within the class it accepts but not in the global scope. But it’s already kind of late to pass it inside the class. Maybe at least some kind of idea. Thank you.
Good afternoon. I am using your code. It works, but there is a question. Let's say the air conditioner is not one, but several, and that for each you need to write a separate file gree_ir.h with your own number Gpio? How to pass the pin number to this file, for example, a global variable.
Something like this, but it doesn't work for me. Help me please. Thank you.