Hello,
I want to make two ways communications between Arduino (as slave) and Raspberry( Master) using ADM2582. Please can someone help me with the different codes.
thank you
Hello,
I want to make two ways communications between Arduino (as slave) and Raspberry( Master) using ADM2582. Please can someone help me with the different codes.
thank you
which Arduino are you using?
have a look at arduino-rs485 tutorial
any particular reason to use RS485?
you can plug the Arduino into a RPi USB port where it creates a serial port , e.g. /dev/ttyUSB0
Thank for your reply
I am using Arduino Due .
Also using ADM2582 because it is power isolated and allow communication in long distance.
what distance are you looking at?
have you a Raspberry Pi RS485 HAT?
what Arduino are you using?
I am using Arduino Due .
the DUE has hardware serial ports, e.g. Serial1 TXD pin 18 and RXD pin 19
on thje RPi are you using RS485 HAT or connecting a RS485 module to GPIO14 UART TX and GPIO15 UART RX or even a USB-RS485 dongle?
you could use a FTDI USB-RS485 or similar USB-RS485 module to connect to the Due Seria1 hardware port via a RS485 module to RPi USB
e.g. connecting a FTDI USB-RS485 to a RPi 3B+ it appears as serial port dev/ttyUSB0 - using putty terminal emulator to communicate
what programming language are you planning to use on the RPi?
I tend to use Java but there is C++, Python, etc
Thank you and sorry for late response
remember to enable the serial using raspi-config
the UART on pins GPIO 14 and 15 should then appear as /dev/ttyS0
you can do a quick echo test by connecting pins 14 and 15 and running putty or a similar terminal emulator
characters entered on keyboard should echo to the display
by using "import serial" Python can access the UART
OK thank you