I got some problem about using MG-811 (CO2 Sensor)

The code you're using is not for the same module you're using. Just because the same sensor is used doesn't mean the rest of the board is identical. Post schematics of the board you are using! Does your board also include an amplifier?