update
This commit is contained in:
12
MPPT/read.py
Normal file
12
MPPT/read.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import serial
|
||||
|
||||
def read_vedirect(port='/dev/serial0', baudrate=19200):
|
||||
ser = serial.Serial(port, baudrate, timeout=1)
|
||||
|
||||
while True:
|
||||
line = ser.readline().decode('utf-8', errors='ignore').strip()
|
||||
if line:
|
||||
print(line) # Raw data from Victron
|
||||
|
||||
if __name__ == "__main__":
|
||||
read_vedirect()
|
||||
Reference in New Issue
Block a user