This repository has been archived on 2024-01-26. You can view files and clone it, but cannot push or open issues or pull requests.
RasPowermeter/raspberrypi/raspi_serial.py
2018-03-18 01:34:09 +01:00

16 lines
275 B
Python

#!/usr/bin/python3
import time
import serial
ser = serial.Serial('/dev/ttyACM0', 9600)
# read Arduino
while True:
input = ser.readline()
input_number = input
print ("Time: " + str(int(time.time())) + " Reflection Value: " + str(input_number)[:-2] + "[v]")