void WriteComand() { if(!strcmp(entrada,"0An0")) { digitalWrite(14, LOW); goto salir1; } if(!strcmp(entrada,"1An0")) { digitalWrite(14, HIGH); goto salir1; } if(!strcmp(entrada,"0An1")) { digitalWrite(15, LOW); goto salir1; } if(!strcmp(entrada,"1An1")) { digitalWrite(15, HIGH); goto salir1; } |
def fAn0(): global An0 if An0 == 0: An0=1 ser.write('1An0\n') else: An0=0 ser.write('0An0\n') print "An0",An0 return def fAn0(): global An0 if An0 == 0: An0=1 ser.write('1An0\n') else: An0=0 ser.write('0An0\n') print "An0",An0 return |