The Link Sprite RS485 GPIO Sheild for a Raspberry Pi alows you to make use of (abuse) the RS232 port in the R-Pi’s GPIO as an RS 485 Port.
There are several good advantages to RS 485 over 232 and some awsome ones.
RS485 is capable of both multidrop and very long cable legnths (even though the data rate can be a bit rubbish, and its normaly half duplex).
To make it work I need to make a few changes to my standard Raspbian install:
The UART is /dev/ttyAMAO, it defaults to output system log. But since I want to use this UART to connect the RS485 board, I need to modify two files: /boot/cmdline.txt and /etc/inittab.
Replace the original content:
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
Comment out the last line of /etc/inittab. To comment out, it simply addess a ‘#’.
$ sudo nano /etc/inittab
#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
Save the changes, and reboot. the TX/RX pins with a baud rate of 115200.