def _output(): s = entradas() sw = tablaTransicion() cont = 0 for i in range(0, 4): if s.dato_entrada == sw.data_in[i]: break pass else: cont = cont + 1 pass pass pass for k in range(0, 4): if sw.data_out[cont][k] == "x" or sw.data_out == "0": sw.data_out[cont][k] = "0" pass pass info = sw.data_out[cont] str1 = ''.join(info) display.display(str1) for j in range(0, 4): if j == 0: if sw.data_out[cont][j] == "1": pinguino.write(b"digitalWrite(4,HIGH)") pass else: pinguino.write(b"digitalWrite(4,LOW)") pass if j == 1: if sw.data_out[cont][j] == "1": pinguino.write(b"digitalWrite(5,HIGH)") pass else: pinguino.write(b"digitalWrite(5,LOW)") pass pass if j == 2: if sw.data_out[cont][j] == "1": pinguino.write(b"digitalWrite(6,HIGH)") pass else: pinguino.write(b"digitalWrite(6,LOW)") pass pass if j == 3: if sw.data_out[cont][j] == "1": pinguino.write(b"digitalWrite(7,HIGH)") pass else: pinguino.write(b"digitalWrite(7,LOW)") pass
def _entrada(): en = entradas() en.setWindowTitle('entradas') en.exec_() pass
def _entradas(): sw = entradas() sw.setWindowTitle('entradas') sw.exec_() pass
def _output(): entrada = entradas() comb_entrada = combEntrada() comb_salida = combSalida() aux = comb_salida.data_in[0] ent = 0 actual = 0 sal = 0 for x in range(0, 16): if aux == comb_entrada.data_edoActual[x]: break pass else: actual = actual + 1 pass pass for i in range(0,16): if entrada.dato_entrada == comb_entrada.data_entrada[i]: break pass else: ent = ent + 1 pass pass aux = comb_entrada.data_edoSiguiente[ent] for z in range(0, 16): if aux == comb_salida.data_in: break pass else: sal = sal + 1 pass pass for j in range(0, 4): if j == 0: if comb_salida.data_out[sal][j] == "1": pinguino.write(b"digitalWrite(4,HIGH)") pass else: pinguino.write(b"digitalWrite(4,LOW)") pass if j == 1: if comb_salida.data_out[sal][j] == "1": pinguino.write(b"digitalWrite(5,HIGH)") pass else: pinguino.write(b"digitalWrite(5,LOW)") pass pass if j == 2: if comb_salida.data_out[sal][j] == "1": pinguino.write(b"digitalWrite(6,HIGH)") pass else: pinguino.write(b"digitalWrite(6,LOW)") pass pass if j == 3: if comb_salida.data_out[sal][j] == "1": pinguino.write(b"digitalWrite(7,HIGH)") pass else: pinguino.write(b"digitalWrite(7,LOW)") pass pass
def _entradas(): sw = entradas() sw.setWindowTitle("tabla de entradas") sw.exec_() pass