Closed olivluca closed 2 months ago
Just to check if the micros() function is reliable, I put this in a platformio sketch
unsigned long pippo=micros();
int level=LOW;
while (true) {
while (micros()-pippo<10) {
}
pippo=micros();
level=1-level;
digitalWrite(CMT2300A_GPIO1_PIN,level);
}
first with 10 and then with 100. With 10 I get 15us pulses, with 100 I get 105us pulses, so the 5us are the rest of the instructions in the loop, meaning the micros() function is fairly accurate. The problem lies somewhere else.
The problem
I'm trying to implement a component for the rf part of a tuya rf and ir bridge and I mostly copied the implementation of remote_receiver and remote_transmitter. The transmitter part is working but the receiver is either dumping nothing or gibberish, so, in order to check if it's a problem with my implementation, I disabled my component and only implemented the standard remote_transmitter and remote_receiver with the ir part of the bridge. Again, the transmitter works (using a camera I see the ir leds flashing when I press the button in the web interface) but the receiver doesn't (it doesn't dump anything or it dumps gibberish). I checked with a logic analyzer that there are pulses on the P8 pin when I point a remote at the sensor. I tried also
dump: raw
instead ofdump: all
Which version of ESPHome has the issue?
2024.7.3
What type of installation are you using?
pip
What platform are you using?
BK72XX
Board
CBU
Component causing the issue
remote_receiver
Example YAML snippet
Anything in the logs that might be useful for us?
No response
Additional information
(I'm not sure it's a nec remote, but pulseview decodes something)
I used
inverted: true
because esphome warned about it in the log, but even withinverted:false
the result doesn't change.