diff options
| author | Abel Tim <abel@main.home> | 2024-07-15 14:53:41 +0200 |
|---|---|---|
| committer | Abel Tim <abel@main.home> | 2024-07-15 14:53:41 +0200 |
| commit | 6fcefaf1c7087675d403bc3451ca1997ecaa83d6 (patch) | |
| tree | e43f6e74fac54aa3c90a514508fe2415430990c3 /debug/motordriver/PID_autotune/man_test.py | |
| parent | 3ce2797f62a124a54644968141feab710b816837 (diff) | |
| download | robotica-6fcefaf1c7087675d403bc3451ca1997ecaa83d6.tar.gz robotica-6fcefaf1c7087675d403bc3451ca1997ecaa83d6.zip | |
poster
Diffstat (limited to 'debug/motordriver/PID_autotune/man_test.py')
| -rw-r--r-- | debug/motordriver/PID_autotune/man_test.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/debug/motordriver/PID_autotune/man_test.py b/debug/motordriver/PID_autotune/man_test.py new file mode 100644 index 0000000..52c84e3 --- /dev/null +++ b/debug/motordriver/PID_autotune/man_test.py @@ -0,0 +1,16 @@ +import serial +import time + +arduino = serial.Serial(port='/dev/ttyACM0', baudrate=115200, timeout=.1) + +def write_read(x): + arduino.write(bytes(x, 'utf-8')) + time.sleep(0.05) + data = arduino.readline() + return data + +while True: + num = input("Enter a number: ") # Taking input from user + value = write_read(num) + print(value) # printing the value + |
