]> vault307.fbx.one Git - micorpython_ir.git/blobdiff - ir_rx/acquire.py
Make compatible with Raspberry Pi Pico (RP2 arch).
[micorpython_ir.git] / ir_rx / acquire.py
index 0f094f9a5244ae10f41a06d874c41fd3473758e7..ea0b2e4eafd35499fa3c7ca2d86dcec57739762c 100644 (file)
@@ -63,9 +63,9 @@ 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
@@ -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()