def irqWait(self): # A race condition may occur here. # Should set a timeout if GPIO.input(self.irq_pin) == 0: return