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/12 17:51] – [WUS1] dprado | notes:c4eng:fall2024:projects:wus1 [2024/11/14 04:37] (current) – [WUS1] dnayo | ||
---|---|---|---|
Line 8: | Line 8: | ||
The final part is bringing everything together, which includes mapping specific frequencies to distances form the sensor. Since we already have the functions for the distance and frequency, the mapping is very straightforward. It just involves using basic algebra using the variable " | The final part is bringing everything together, which includes mapping specific frequencies to distances form the sensor. Since we already have the functions for the distance and frequency, the mapping is very straightforward. It just involves using basic algebra using the variable " | ||
+ | |||
+ | |||
+ | **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 16: | 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' |