Hi, I'm trying to recieve messages from a RS485 device but the messages being printed to my serial monitor isn't matching the expected response. I'm using the TinySine RS232/RS485 shield with my uno board. I'd appreciate any pointers for communicating with RS485 deivces.
Can you please post a link to data/specs of the TinySine?
Can you please post a copy of your circuit, a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.
since the RS-485 bus is half-duplex, only one transmitter can be enabled at a time, the transmitter must be enabled before transmission and wait for the Serial.flush() command to return (indicating transmission is complete) before disabling the transmitter.
besides the TX/RX pins, the RS-485 interface should have an receive enable and transmit enable pins. they are typically opposite polarity so that they can be wired together, either enabling the transmitter or the receiver
The schematic for the shield linked to in post #3 has this comment:
The UART_TX_485 with the FET(Q3) will help control the direction,but it's not perfect. In this case,the RS485 bus should be pulled up with resistor.otherwise the high level bit of send byte can't be sent to the RS485 BUS.
The schematic also appears to show that the default setting is for automatic direction control of the RS485 bus. Manual control appears to involve altering a solder jumper on the shield - bottom left corner of the schematic.