My code look like this:
Code: Select all
LinearActuatorDir_x =40
LinearActuatorStepPin_x = 38
def Forward_x():
GPIO.output(LinearActuatorDir_x, 0)
GPIO.output(LinearActuatorStepPin_x, 0)
time.sleep(0.0003)
GPIO.output(LinearActuatorStepPin_x, 1)
time.sleep(0.0003)
)
Code: Select all
LinearActuatorDir_x = "I_1"
LinearActuatorStepPin_x = "I_2"
def Forward():
rpi.io["LinearActuatorDir_x "].value = 0
rpi.io["LinearActuatorStepPin_x "].value = 0
time.sleep(0.0003)
rpi.io["LinearActuatorStepPin_x "].value = 1
time.sleep(0.0003)