Skip to content

Commit

Permalink
direction pin typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Doug Ollerenshaw committed May 22, 2019
1 parent 8e0f60c commit aa3ad8c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions stepper.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from pyfirmata import Arduino, util
# from pyfirmata import Arduino, util
from gpiozero import DigitalOutputDevice
import time


class Stepper(object):
def __init__(self, port='/dev/ttyACM0', syringe='5ml', mode='arduino', disable_when_inactive=True):
def __init__(self, port='/dev/ttyACM0', syringe='5ml', mode='rpi', disable_when_inactive=True):
self.mode = mode
if self.mode == 'arduino':
self.arduino = Arduino(port)
Expand Down Expand Up @@ -111,7 +111,7 @@ def set_direction(self, direction):
self.set_pin(self.dir_pin, 0)
self._direction_multiplier = -1
elif direction.lower() == 'ccw' or direction.lower() == 'dispense':
self.set_pin(self.dir_pin, 0)
self.set_pin(self.dir_pin, 1)
self._direction_multiplier = 1
self._direction = direction
return direction
Expand Down

0 comments on commit aa3ad8c

Please sign in to comment.