pages
compiler
electronics
laboratory
Processing
Theremino
logggin
sensore_PIR
introduction
PIR stands for Passive InfraRed sensor. Detects the minimum of infrared heat emanating from a person or an object. The PIR stores as normal all that does not change around him. The wall of a room in front of him does not change temperature (only very slowly from day to night) and then records it as normal. A person who passes in front emits heat, the PIR registers this immediate change.
We build an alarm, an audible beep and an LED that flashes when someone approaches
program
algorithm
attrezzaggio
pin13 _red_led
pin0 _altoparlante
pinA0 _sensor_PIR
variabili
X = 0
ciclo
the variable X is equal to... read the sensor: _sensor_PIR
write on the serial:
valore di... X
IF HAPPENS THAT
X is greater than 100
SWITCH ON (5 Volt)
_red_led
PLAY the note
C central (262Hz) duration:
500 milliseconds
wait
1000 milliseconds
SWITCH OFF (0 Volt)
_red_led
PLAY the note
3 G (392Hz) duration:
500 milliseconds
wait
1000 milliseconds
Arduino code
electrical connections