peterhinch / micropython_ir

Nonblocking device drivers to receive from IR remotes and for IR "blaster" apps.
MIT License
258 stars 51 forks source link

Esp32 double transmission #39

Closed githubniwis closed 7 months ago

githubniwis commented 7 months ago

Wanting to control my tv via node-red/mqtt I installed your software on an esp32.

from machine import Pin from ir_tx.philips import RC6_M0

pin = Pin(15, Pin.OUT, value = 1) to_tv = RC6_M0(pin) to_tv.transmit(0, 9) # 9 is BBC2

When I power up the esp32, everything works fine. However when I do a restart/stop backend via Thonny, the signal is transmitted twice, so I get 99 instead of 9. Having spent several evenings tinkering, I have to give up. Can you help me?

peterhinch commented 7 months ago

A number of issues in Discussions have been connected to Thonny. It's also difficult to support Thonny problems because it doesn't seem to be possible to produce a session listing. Please could you repeat your testing using the official mpremote tool. If the error occurs, please post a listing of the session and I'll try to figure out what's going on.

githubniwis commented 7 months ago

Your answer made me realise that Thonny was the cause of the double transmission, so problem solved. Everything works just fine. Thank you for taking the time.

peterhinch commented 7 months ago

Thanks for reporting back. I keep encountering the words "Thonny" and "problem" in close proximity...