Now that we have established and verified our Raspberry Pi 4B baseline configuration, we can now put our Raspberry Pi 4B-based IoT platform to work. Today, we will code a TCP/IP socket application that targets the Raspberry Pi 4B’s GPIO subsystem. We will code a C-based application to manipulate the Raspberry Pi 4B’s native set of GPIO pins. We will also use a TCP/IP connection to toggle the GPIO pins of a Microchip MCP23S17 I/O Expander, which will be mounted on the Pi 4 click shield.
In addition, today’s lecture content will include a TCP/IP socket application that reports temperature and humidity gleaned from a Raspberry Pi 4B-supported CM2322 temperature/humidity sensor, which is also mounted on the Pi 4 click shield. The firmware component of today’s GPIO lecture will consist of a simple TCP/IP socket application followed up by a thread-based socket application.