X-Git-Url: https://vault307.fbx.one/gitweb/micorpython_ir.git/blobdiff_plain/a5c58e92f187b72111774f417d82238ec7e3b6eb..d7ff5be7654ececde87be89f32a08986b5c3b5c7:/ir_rx/acquire.py diff --git a/ir_rx/acquire.py b/ir_rx/acquire.py index e8c6a12..af3ab38 100644 --- a/ir_rx/acquire.py +++ b/ir_rx/acquire.py @@ -70,8 +70,8 @@ class IR_GET(IR_RX): print('Protocol start {} {} Burst length {} duration {}'.format(burst[0], burst[1], lb, duration)) ok = True - if not ok and near(burst[0], 4500) and near(burst[1], 4500): # Samsung? - print('Unsupported protocol. Samsung?') + if not ok and near(burst[0], 4500) and near(burst[1], 4500) and lb == 67: # Samsung + print('Samsung') ok = True if not ok and near(burst[0], 3500) and near(burst[1], 1680): # Panasonic? @@ -101,6 +101,8 @@ def test(): pin = Pin(13, Pin.IN) elif platform == 'esp32' or platform == 'esp32_LoBo': pin = Pin(23, Pin.IN) + elif platform == 'rp2': + pin = Pin(16, Pin.IN) irg = IR_GET(pin) print('Waiting for IR data...') - irg.acquire() + return irg.acquire()