Hello!
I haven't worked with the Arduino very much and I'm not good in programming.
My goal is, to build a alarm system, that reacts on movement/shock.
Therefore my Idea was to build a system simmilar to this example:
A plastic piece should fall out of the circuit(5V to pin 2)(simmilar to a button) and the Arduino should detect this.
So if the circuit is closed, the Arduino should make a sound for 5min (for example).
My problem is, that the sampleprogramm would detect a closed circuit, even if it isn't like this.
How can I programm the Arduino, that he only reacts in the case of a closed circuit?
Thank you for your answers!