Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import serial
- import time
- import requests
- import os
- arduino = serial.Serial('/dev/ttyUSB0', 9600)
- os.system('cls' if os.name == 'nt' else 'clear')
- while 1:
- valores = arduino.readline()
- valores = str(valores)
- VALUE_SERIAL = valores.split(";")
- A = (VALUE_SERIAL[0])
- B = VALUE_SERIAL[1]
- C = VALUE_SERIAL[2]
- D = VALUE_SERIAL[3]
- E = VALUE_SERIAL[4]
- F = VALUE_SERIAL[5]
- timeout = 10
- B1 = requests.get("https://script.google.com/macros/s/AKfycbzgDF4Cw1NbqwtVeDw8sceywuMQW3gMxuePX33IR4O5AUPVKogR/exec?Axy="+str(D))
- C1 = requests.get("https://script.google.com/macros/s/AKfycbzgDF4Cw1NbqwtVeDw8sceywuMQW3gMxuePX33IR4O5AUPVKogR/exec?Bxy="+str(E))
- time.sleep(10)
- os.system('cls' if os.name == 'nt' else 'clear')#Limpa a tela do console
- pass
- print ('\nValor de A: %s' % (D))
- print ('\nValor de B: %s' % (E))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement