Created
June 30, 2018 20:43
-
-
Save nkenna/3524f294275fbe948d2605f688dd8f00 to your computer and use it in GitHub Desktop.
generate random ints from 1 - 5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print(ser.readline()) | |
num = random.randint(1, 5) | |
print(num) | |
ser.write(bytes(str(num), 'utf-8')) | |
print(str(num)) | |
time.sleep(5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment