ok, i've spent a few hours messing about with this and i got nowhere. tried the github web build etc but still cant get the relay to activate (keeping in mind that i only use the phone to operate the game selection from the pi (no screen/buttons attached to the pi3)).
Does this section from piforcetools.py not mean there must be a physical "SELECT" button pressed in order to switch the gpio output high?
while True:
# Handle SELECT
if lcd.buttonPressed(lcd.SELECT):
if lcd.SELECT not in pressedButtons:
pressedButtons.append(lcd.SELECT)
if selection is "Change Target":
curr_ip += 1
if curr_ip >= len(ips):
curr_ip = 0
lcd.message("\n"+ips[curr_ip])
elif selection is "Ping Netdimm":
lcd.clear()
lcd.message("Pinging\n"+ips[curr_ip])
response = os.system("ping -c 1 "+ips[curr_ip])
lcd.clear()
if response == 0:
lcd.message("SUCCESS!")
else:
lcd.message("Netdimm is\nunreachable!")
sleep(2)
lcd.clear()
lcd.message(selection)
else:
GPIO.setmode(GPIO.BOARD)
GPIO.setup(40, GPIO.OUT)
GPIO.output(40,1)
sleep(0.4)
GPIO.output(40,0)
lcd.clear()
lcd.message("Hard Reset\nWait...")
sleep(2.0)
lcd.clear()
lcd.message("Connecting...")
Does this section from piforcetools.py not mean there must be a physical "SELECT" button pressed in order to switch the gpio output high?
while True:
# Handle SELECT
if lcd.buttonPressed(lcd.SELECT):
if lcd.SELECT not in pressedButtons:
pressedButtons.append(lcd.SELECT)
if selection is "Change Target":
curr_ip += 1
if curr_ip >= len(ips):
curr_ip = 0
lcd.message("\n"+ips[curr_ip])
elif selection is "Ping Netdimm":
lcd.clear()
lcd.message("Pinging\n"+ips[curr_ip])
response = os.system("ping -c 1 "+ips[curr_ip])
lcd.clear()
if response == 0:
lcd.message("SUCCESS!")
else:
lcd.message("Netdimm is\nunreachable!")
sleep(2)
lcd.clear()
lcd.message(selection)
else:
GPIO.setmode(GPIO.BOARD)
GPIO.setup(40, GPIO.OUT)
GPIO.output(40,1)
sleep(0.4)
GPIO.output(40,0)
lcd.clear()
lcd.message("Hard Reset\nWait...")
sleep(2.0)
lcd.clear()
lcd.message("Connecting...")