X-Git-Url: https://vault307.fbx.one/gitweb/micorpython_ir.git/blobdiff_plain/2cc41dced14dadbc4df94bc36bf72ecbda9c2c6a..f5416855b709f5605982eeb001f05d073ec1fdb4:/ir_rx/acquire.py?ds=sidebyside diff --git a/ir_rx/acquire.py b/ir_rx/acquire.py index 0f094f9..af3ab38 100644 --- a/ir_rx/acquire.py +++ b/ir_rx/acquire.py @@ -63,15 +63,15 @@ class IR_GET(IR_RX): print('Philips RC-6 mode 0') ok = True - if not ok and near(burst[0], 2056) and near(burst[1], 945): + if not ok and near(burst[0], 2000) and near(burst[1], 1000): if near(duration, 19000): - print('Microsoft MCE edition protocol. Not yet supported.') + print('Microsoft MCE edition protocol.') # Constant duration, variable burst length, presumably bi-phase 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,13 +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() - -# Yamaha NEC -# Virgin RC-5 - -# Samsung Unknown protocol 4576 4472 67 60755 -# Panasonic Unknown protocol 3526 1679 99 54303 -# Vista MCE edition Unknown protocol 2056 945 25 18935 + return irg.acquire()