I have never touched a MCP23008 and MCP3002 before. I will try to read about them later. Thanks bro.
I will use your codes from your post to get my sensor readings.
I should have paid attention to the sensor’s output voltage before I bought them.
But “in most cases”, widely available sensors from China (or the ones sold in Indonesia) have 5v outputs.