Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
if (motion==1)
{
buffer=1;
}
else if (motion==0)
{
buffer=0;
}
That may be a problem. The digital input on RC6 needs to be at least 0.8Vdd. If Vdd is 5V, then 0.8Vdd = 4V. But you're saying the sensor typically registers just under 4V, so it may not trigger a digital high on the pin. So you have to fix that before you fix your code.Rusttree,the supply voltage is 5V.
if (motion==1)
{ buffer=1;
}
if ((clkmin==alarmMin) && (clkhrs==alarmHrs) && (buffer==0))
{
buzzer=1;
}
else
{
buzzer=0;
}
if ( (clkmin==alarmMin) && (clkhrs=alarmHrs) && (motion==1) )
{
buzzer=1;
}