I'm trying to make a code that detects long light signals and short ones.
Although I'm struggling with finding the right code for this.
(i'm working with a light sensor)
Could someone help me out?
Thank you in advance
Although I'm struggling with finding the right code for this.
The code you posted does something. You did not way what it does. Which, pf course, is reasonable because you haven't a clue what it actually does, since there are no Serial.print() statements in it.
It is unreasonable, though, that there are no Serial.print() statements.
You expect the code to do something, although you kept those expectations to yourself.
We can't help you make the code's actual behavior match your expectations, based on the data we have so far.