Arduino Nano with DS18B20 temp sensor.

Arduino Raspberry Pi Interface with LCD Display

by Lewis Loflin

For an explanation on the operation of the LCD part of this page see Connect a Serial LCD Display to Raspberry Pi

For an explanation of how to read 16-bit code from Arduino without the use of I2C see Serial Read from Arduino to Raspberry Pi

The Arduino sketch is arduino_ds18b20X2.ino.

This program is a combination of the above two programs. Arduino operates any number of sensors while Raspberry Pi reads the integer results, does any conversions, and displays the result on a serial LCD display.

The program will reset Arduino and the sensor routines/calls are in the Arduino setup section. The return value is stored in a variable and read back by Raspberry Pi.

Arduino is programmed to operate as a 16-bit TLC548 ADC.

The Python code is rpi_arduino3.txt.

The GPIO connections are as follows:

GPIO.setmode(GPIO.BCM)

CS = 18
CLK =23
dataBit = 24
Reset = 25


This is a collection of programs and hardware hacks related to mainly Raspberry Pi and Debian Linux.


Web site Copyright Lewis Loflin, All rights reserved.
If using this material on another site, please provide a link back to my site.