]> vault307.fbx.one Git - micorpython_ir.git/blobdiff - ir_tx/mcetest.py
Make compatible with Raspberry Pi Pico (RP2 arch).
[micorpython_ir.git] / ir_tx / mcetest.py
index 250c693c260b5bcd62633c991b0e8ad4bf4f4f7a..fc473d9c71abfa51db11c50d2893dce4b00931e2 100644 (file)
@@ -53,10 +53,7 @@ class Rbutton:
             self.irb.transmit(self.addr, self.data, _REP, True)
 
 async def main():
-    if ESP32:  # Pins for IR LED gate
-        pin = (Pin(23, Pin.OUT, value = 0), Pin(21, Pin.OUT, value = 0))
-    else:
-        pin = Pin('X1')
+    pin = Pin(23, Pin.OUT, value = 0) if ESP32 else Pin('X1')
     irb = MCE(pin)  # verbose=True)
     # Uncomment the following to print transmit timing
     # irb.timeit = True