User Tools

Site Tools


notes:c4eng:fall2022:projects:sss2

This is an old revision of the document!


CIRCUITS

LED

When you pick up the LED, you will notice that one leg is longer than the other. The longer leg (known as the ‘anode’), is always connected to the positive supply of the circuit. The shorter leg (known as the ‘cathode’) is connected to the negative side of the power supply, known as ‘ground’.LED stands for Light Emitting Diode, and glows when electricity is passed through it.

LEDs will only work if power is supplied the correct way round (i.e. if the ‘polarity’ is correct). You will not break the LEDs if you connect them the wrong way round – they will just not light. If you find that they do not light in your circuit, it may be because they have been connected the wrong way round.

LEDs should be supplied power on the long leg by a GPIO pin running through a resistor. When the output of the GPIO is triggered HIGH it will light the corresponding LED.

BUTTON

connect one side of the switch to an input pin on the Raspberry Pi. The other side of the switch we connect to 3.3V on pin 1 using a resistor. The resistor is used as a current limiting resistor to protect our input pin by limiting the amount of current that can flow.

BUZZER

There are two main types of buzzer: active and passive.

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.

ACCESSING COMPONENTS

LED

BUTTON

BUZZER

So the game has three leds. Each led corresponds to a sound that the buzzer makes. Also, the buzzer is set to tell the player if their guess was correct or incorrect. So, make the lose sound a low frequency and the win sound a high frequency.

DIAGNOSTICS

LED

BUTTON

The buttons are to tell the game which leds lit up, or at least what the player thought lit up.

SIMON SAYS GAME

Simon says is basically a memory game. The led lights used are to present a pattern to a player. Initially the pattern only has one led that lights up. After each round the game adds another led to the pattern which you need to remember and present to the game through the use of buttons.

DESCRIPTION

This game requires four leds, one buzzer, and four buttons.

TONES

notes/c4eng/fall2022/projects/sss2.1667319086.txt.gz · Last modified: 2022/11/01 16:11 by cmillica