Only half, on purpose
Today you wire your input and nothing else. Print its value to the Serial Monitor, and watch
it while you make the thing happen that it is supposed to detect.
Resist wiring the output. Every year, the teams that wire everything at once spend session 26
trying to work out which half is broken, and the teams that build in halves are finished
early.
- Wire the input. Just the input.
- Print its value in a loop, with a short delay.
- Make the thing happen — walk towards it, warm it, press it, whatever it is.
- Write down the numbers. What does it read normally? What does it read when the thing is happening?
- Now choose your threshold from those two numbers, not from a guess. Put it somewhere between them, nearer the normal value.
- Write the threshold and one sentence saying why, in your notebook.
💡 Tip
The gap between your two numbers is the most useful thing you will learn today. If ‘normal’ is 300 and ‘happening’ is 310, your machine will be unreliable no matter how good your code is — and you have found that out now, with a session in hand to change the sensor or move it closer.