You can also use a small module which connects to the i2c and will give you extra pins when you need them.
pcf8575
https://create.arduino.cc/projecthub/xreef/pcf8575-i2c-16-bit-digital-input-output-expander-48a7c6
You can also use a small module which connects to the i2c and will give you extra pins when you need them.
pcf8575
https://create.arduino.cc/projecthub/xreef/pcf8575-i2c-16-bit-digital-input-output-expander-48a7c6