Attached is a picture of my Arduino board. I have it setup so that if I wave my
ID: 2292489 • Letter: A
Question
Attached is a picture of my Arduino board. I have it setup so that if I wave my hand above the photoresistor, I can see the effected values in the serial monitor.
I have a speaker I'm connecting to the board with a red wire and black wire. I think I need to use a BJT. I need the program to read the photoresistor and sound an alarm though the speaker is something Blocks the light (like a tripwire). I will be using an iPhone flashlight and passing my hand over it. The alarm has to be triggered instantly and CANNOT stop. It has to be looped infinitely.
Explanation / Answer
You need to use conditional statement for alarming system.
IF and Else
For an example
your need speaker triggered at value when analog value is greater than 100
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.