sylvie-2024

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

stepperTester_keyb-serial_old.py (465B)


      1 from time import sleep
      2 from serial import Serial
      3 
      4 import serial
      5 import keyboard
      6 import os
      7 import sys
      8 
      9 ser = serial.Serial('/dev/ttyUSB0', 9600) # Establish the connection on a specific port
     10 
     11 while True:
     12     print("Welcome to SylvieOS 2020!")
     13     keyboardInput = str(input("Please enter an angle for the gearbox to move to: "))
     14 
     15     if keyboardInput == "exit":
     16         exit()
     17     else:                                     
     18         ser.write(keyboardInput.encode())