Getting the library for Waveshare MCP23017 IO expansion board

(deleted)

AdaFruit has a library for the MCP23017 I2C I/O expander chip. You can find it here. Have a look at the readme.md file as that will tell you how to add the files to your Arduino library.