I have an RS-485 Shield that im using but none of the sample code or online guides for this that i can find seem to work. I'm not interested at this stage in doing anything with the data i just want to see a data stream of bits as i want to troubleshoot a network to see if is actually transmitting data.
The baudrate is 19200.
the code im using is as follows from (https://wiki.seeedstudio.com/RS-485_Shield_for_Raspberry_Pi/) with some edits.
#!/usr/bin/env python
import time
import serial
import os
from gpiozero import LED
ser = serial.Serial(port='/dev/serial0',baudrate =19200,timeout=1)
data = ''
Rx_Disable = LED(18)
Rx_Disable.off()
while True:
str = ser.readall()
if str:
print str
Any idea what im doing wrong?