Raspberry Pi is a small, credit-card-sized computer you can use for electronics projects and for learning about hardware and coding.
Raspberry Pi hardware has a limited number of digital I/O pins. This example shows you how to increase the number of digital I/O pins by connecting a MCP23017 I/O expander chip to the Raspberry Pi hardware.
You can add 16 digital I/O pins by connecting a MCP23017 I/O expander chip to the Raspberry Pi hardware. Then, using I2C, you can use the additional pins as digital inputs or outputs. You can use the sample MATLAB® code provided in the example to learn how to test the connection by executing basic MATLAB commands to blink a red LED.
Note: If you’re new to Raspberry Pi, follow the steps in the Getting Started with Raspberry Pi Hardware example first.
Follow the step-by-step instructions here: <b>https://www.mathworks.com/examples/matlab/4547-add-digital-i-o-pins-to-raspberry-pi-hardware-using-mcp23017