# Pastebin Zm0iIzun fsm.act("DATA_WAIT", If(self.scl_r == 1, NextState("DATA_READY")), ) fsm.act("DATA_READY", If(self.scl_r == 0, If(self.current_bit < 8, NextValue(self.current_bit, self.current_bit+1), NextState("DATA_WAIT"), ).Else( NextState("ACK_SEND"), ), ), )