Skip to content
Snippets Groups Projects
Commit 5b607086 authored by Ilona Szczot's avatar Ilona Szczot
Browse files

After releasing pull pressure. Create vacuum for a bríef moment, then pull...

After releasing pull pressure. Create vacuum for a bríef moment, then pull with a very low force to prevent overheating when vacuum is created
parent b2f8a624
No related branches found
No related tags found
No related merge requests found
import serial import serial
import time import time
# max 1024
TEST_VALUE = 1000 TEST_VALUE = 100
# a very low value to pull in an unnoticable way
REST_VALUE = 1
SLEEP_SEC = 5 SLEEP_SEC = 5
# com port for arduiono usb # com port for arduiono usb
...@@ -23,6 +25,14 @@ try: ...@@ -23,6 +25,14 @@ try:
arg = bytes(str(int(-TEST_VALUE)), 'utf8','ignore') + b'\r' arg = bytes(str(int(-TEST_VALUE)), 'utf8','ignore') + b'\r'
# send to arduino serial # send to arduino serial
my_serial.write(arg) my_serial.write(arg)
# hold that value for SLEEP_SEC
time.sleep(SLEEP_SEC)
# negative creates constant vacuum and that overheats one part
# therefore, send very low value to pull in an unnoticable way
arg = bytes(str(int(REST_VALUE)), 'utf8','ignore') + b'\r'
# send to arduino serial
my_serial.write(arg)
except: except:
print("Problem finding device.\nCheck your com port or device.") print("Problem finding device.\nCheck your com port or device.")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment