This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
notes:c4eng:fall2024:projects:wus1 [2024/11/13 03:39] – [WUS1] cnicho20 | notes:c4eng:fall2024:projects:wus1 [2024/11/14 04:37] (current) – [WUS1] dnayo | ||
---|---|---|---|
Line 10: | Line 10: | ||
+ | **Joystick and active buzzer.** | ||
+ | First create a function where the buzzer is sounded off when a button is hit. When the button is hit the active button works by generating sound through an internal oscillating circuit when power is supplied to it. Unlike a passive buzzer which requires an external signal to produce sound, an active buzzer only needs a simple on/off signal to make noise. The second step was to unhook the button and replace it with a joystick which is a component that computes the position of its handle relative to its base as values of x,y,z on a 3-dimensional plane. The x plane of the joystick was hooked up to the buzzer so when pushed down the buzzer would sound off until released | ||
+ | {{: | ||
+ | **Joystick, Servo and Button** | ||
+ | First, make sure you've downloaded the appropriate files needed. This includes the Joystick, the ADCDevice, the ButtonLED, and the Sweep (servo) file from Github' | ||
=====project idea===== | =====project idea===== | ||
Line 19: | Line 24: | ||
Passive Buzzer: | Passive Buzzer: | ||
Uses the frequency of an AC input to create an oscillating electric field. The oscillating electric field then causes a thin, inner diaphragm to vibrate, which creates sound waves. Higher frequencies cause a faster vibration and a higher pitch. A lower frequency corresponds to a lower pitch. | Uses the frequency of an AC input to create an oscillating electric field. The oscillating electric field then causes a thin, inner diaphragm to vibrate, which creates sound waves. Higher frequencies cause a faster vibration and a higher pitch. A lower frequency corresponds to a lower pitch. | ||
+ | |||
+ | Joystick: | ||
+ | The joystick is a component that computes the position of its handle relative to its base as values of x, y and z on a 3-dimensional plane. Like on a 3-dimensional graph, the y-axis correlates to forward and backwards and the x-axis correlates to right and left, while pressing the handle down like a button adjusts the calculations along the z-axis. The five pins positioned to the left of the joystick are, from top to bottom: ground, (+)5 voltage power, x-variable, y-variable, and GPIO Pin input. The x and y-variable pins are connected to an analog-to-digital converter (ADC) device used to help process the information regarding the position of the joystick controller to the computer. | ||
+ | |||
+ | Active Buzzer: | ||
+ | The active buzzer generates a sound when it receives a voltage signal. Inside the buzzer, there' | ||
====description==== | ====description==== | ||
Passive Buzzer: Using the diagram and code from GitHub' | Passive Buzzer: Using the diagram and code from GitHub' |