When I configure the RelayPlus board, one statement is overwritten by the second one.
If I start with (pifacerelayplus.RELAY), my GPIO's work and I can toggle the 4 x_pins[0].VALUE with a button.
But the motor control instructions do not work.
But if I start with MOTOR_DC, the motor instructions work, but I cannot use the 4 GPIO's on the relay+ board
Do not know what I'm doing wrong.
import pifacerelayplus
import time
# Now initialise your Relay+.
pfr_relay = pifacerelayplus.PiFaceRelayPlus(pifacerelayplus.RELAY)
pfr_motor = pifacerelayplus.PiFaceRelayPlus(pifacerelayplus.MOTOR_DC)
while True:
pfr_relay.relays[0].set_high()
time.sleep(1)
print("Pin 0 GPIO = " + str(pfr_relay.x_pins[0].value))
#while True:
# pfr_relay.relays[0].set_high()
# time.sleep(1)
# print("Pin 0 GPIO = " + str(pfr_relay.x_pins[0].value))
# pfr_motor.motors[1].forward()
# time.sleep(2)
# pfr_motor.motors[1].coast()
# time.sleep(5)