Toggle a loop on/off when two buttons are pulled high?

Hi guys. My goal is to have two momentary pushbuttons (each on their own IO lines) function as an AND gate, and I would like this AND gate to toggle a loop on or off (the loop just has some code to control a buzzer).

In practice, I would press these two buttons together, which would effectively turn the beeper on or off, but when each button is pressed individually, nothing will happen.

I'm not sure what the best way is to do this and I'm extremely new to Arduino stuff in general. Any ideas? Thanks!

Touch here for the full post on the Arduino Apprentices tumblr

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s