+def test(proto=0):
+ classes = (NEC_8, NEC_16, SONY_12, SONY_15, SONY_20, RC5_IR, RC6_M0)
+ ir = classes[proto](p, cb) # Instantiate receiver
+ ir.error_function(print_error) # Show debug information
+ #ir.verbose = True
+ # A real application would do something here...
+ while True:
+ print('running')
+ time.sleep(5)
+ gc.collect()