jimfraseruk
New Member
I am slowly building an start/ finish beam break gate for a timer. I have setup a couple of the bits that I think I need, PWM for IR beam, Piezo buzzer to signal the start/ stop, now I wanted to test the break by using a button rather than the IR receiver just. But the event is triggered when my finger goes anywhere near the button or its pull up resistor, I don't have a chance to press it. If I use a long plastic object to press the switch it works fine. Other projects I have created with switches work fine.
So why does my finger not the switch trigger the event and how can I fix it?
I think I narrowed it down to be something to do with TMR1 as when I comment out that code the button works fine to turn the buzzer on when I hold the button down.
Rough circuit diagram and code attached. I have set it up on a breadboard with 5v regulator.
So why does my finger not the switch trigger the event and how can I fix it?
I think I narrowed it down to be something to do with TMR1 as when I comment out that code the button works fine to turn the buzzer on when I hold the button down.
Rough circuit diagram and code attached. I have set it up on a breadboard with 5v regulator.