Showing the temperature on an LCD
This section describes how to display the IR temperature measurement on an LCD through the I2C bus. The temperature data is sent by the Arduino Uno to the Blue Pill, as shown in the previous section. Figure 12.8 shows a Fritzing diagram containing the microcontroller boards, the LCD, and the IR temperature sensor:
As Figure 12.8 shows, the LCD connection is simple. It requires four wires only, because the LCD used in this chapter is I2C-capable, having an I2C interface in the back. The following are the steps for connecting the LCD to the Blue Pill:
- Connect the LCD's ground (
GND
) pin to Blue Pill's ground (G
orGND
) pin. - Connect the LCD's voltage (
VCC
) pin to Blue Pill's 5-volt (5V) pin. - Connect the LCD's SDA pin to Blue Pill's B7 pin.
- Connect the LCD's SCL pin to Blue Pill's B6 pin.
Figure 12.9 depicts...