AnsweredAssumed Answered


Question asked by Jack Monaghan on Aug 16, 2015
Latest reply on Aug 18, 2015 by Earl Orlando Ramirez Sanchez

Hello I'm a teenager and need help writing one of my first programs. Any Help is greatly appreciated:)

Ok so I've made a diagram of how the program/(part of the circuit) will be set out

so if you press the button but haven't pulled out the pull out it will play a noise on loop and when you press it

again it will turn off. But if you have taken the pullout out it puts it into an "ACTIVE" mode so as soon as you press

the button it will start playing and won't stop until the batteries die no matter how many times you try to turn it off.

define: GPIO, noise function, speaker function,

1. A low speed voltage is put through both the GPIO outputs.

2. Both the GPIO inputs keep sampling for any input.


     A. The "contact" gets an input and the button does as well it will jump to the part of the code where it will just play the noise on loop

     until the batteries die.

     B, Their is an input in the button function but not the "contact" functions it will start playing the code that just plays the noise on loop until the button is pressed again to turn it off