@shinshin8 You must ignore that the Arduino IDE reports lilygo boards and select your own Core from the drop down. The IDE is just trying to be helpful, but is always wrong, just ignore it and select the correct board from the drop down list in the little window here:1600.jpg

Also questions:
Are you using this example:
https://github.com/m5stack/M5Unit-ReflectiveIR/blob/main/examples/detect.ino?

Have you tried adjusting the sensitivity trim pot full scale, CW, CCW?

Your hand may not reflect enough IR.

The output is active low, so you should see 0Vdc when a reflective object is in the path. ADC will output 0 digital, Off as well.