You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are parts of the code that depend on the use of limit switches on the syringe pump, namely in functions like auto_home() and subsequently interfaces.drive_step_stick()
def drive_step_stick(cycles, direction):
...
temp = arduino.readline()
if temp == b"DONE\r\n" or temp == b"":
return 0
else:
return int(temp)
The return int(temp) above refers to the arduino returning the amount of steps that were left before it hit the limit switch. From there the idea is we can recalibrate if for some reason the plunger of the syringe isn't where we thought it was. Functions like auto_home() (which tells the stepper to move 10000 steps, when 9550 is the full 1mL volume) are in the code but aren't used because these limit switches haven't been implemented in hardware, and there isn't any software in place for what to do with the returned integer if we do hit the switch at an unexpected time.
To Do:
Add the stepper motors in hardware, into the Arduino D3 and D4 pins (See Pi-ArduinoStepStickDriver.ino)
Add in software handling for the returned integer, such as setting a new volume of 0 or 1 depending on the direction the stepper was moving, and telling it to pump again for the remaining volume that wasn't added to the solution yet.
The text was updated successfully, but these errors were encountered:
There are parts of the code that depend on the use of limit switches on the syringe pump, namely in functions like
auto_home()
and subsequentlyinterfaces.drive_step_stick()
The
return int(temp)
above refers to the arduino returning the amount of steps that were left before it hit the limit switch. From there the idea is we can recalibrate if for some reason the plunger of the syringe isn't where we thought it was. Functions likeauto_home()
(which tells the stepper to move 10000 steps, when 9550 is the full 1mL volume) are in the code but aren't used because these limit switches haven't been implemented in hardware, and there isn't any software in place for what to do with the returned integer if we do hit the switch at an unexpected time.To Do:
Pi-ArduinoStepStickDriver.ino
)The text was updated successfully, but these errors were encountered: