Ear Clip Sensor Grove


I am currently trying to make a python program for the ear clip sensor but i cant find some sample code, and my code doesnt’t even work.
Does anyone could help me, its urgent!

I attached my code, there the problem is that the interrupt value never changes to true

EarClip.py (1.5 KB)