This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
notes:c4eng:fall2022:projects:sss2 [2022/11/01 16:17] – [BUTTON] cmillica | notes:c4eng:fall2022:projects:sss2 [2022/11/02 01:06] (current) – [TONES] cmille71 | ||
---|---|---|---|
Line 16: | Line 16: | ||
A passive buzzer emits a tone when a voltage is applied across it. It also requires a specific signal to generate a variety of tones. The active buzzers are a lot simpler to use, so these are covered here. | A passive buzzer emits a tone when a voltage is applied across it. It also requires a specific signal to generate a variety of tones. The active buzzers are a lot simpler to use, so these are covered here. | ||
+ | In order to modulate both the frequency and operation of the buzzer, a transistor is used. A transistor can be thought of as a switch or a gate. It regulates or controls current or voltage flow. It consists of three parts, the collector, base and emitter. The collector in our case is connected to ground. The base is where the GPIO output is regulating the current traveling through the buzzer through the emitter to ground. | ||
=====ACCESSING COMPONENTS===== | =====ACCESSING COMPONENTS===== | ||
Line 21: | Line 22: | ||
====LED==== | ====LED==== | ||
+ | The first step in our program is ensuring that the pins we are using for our LEDs are set up to be outputs. This way the pi knows it is sending a signal to something rather than looking for a signal from something. | ||
====BUTTON==== | ====BUTTON==== | ||
+ | The first step in our program is ensuring that the pins we are using for our buttons are set up to be inputs. This way the pi knows it is receiving a signal from the button as an input. | ||
====BUZZER==== | ====BUZZER==== | ||
Line 29: | Line 32: | ||
====LED==== | ====LED==== | ||
+ | The LED's will light up in correspondence to a note to help the player memorize the pattern. They will light up again when their corresponding button is pressed to play back the pattern | ||
====BUTTON==== | ====BUTTON==== | ||
Line 41: | Line 44: | ||
This game requires four leds, one buzzer, and four buttons. | This game requires four leds, one buzzer, and four buttons. | ||
====TONES==== | ====TONES==== | ||
- | + | Overall you will need a total of 6 tones in this project. These tones in this project will indicate which color led is activated. These tones will also be indicative of whether or not you have won the game. |