User Tools

Site Tools


notes:c4eng:fall2024:projects:wus1

This is an old revision of the document!


WUS1

Add a section with supporting information for each project

project idea

components

Ultrasonic Sensor: An ultrasonic sensor measures distance by emitting ultrasonic waves from the sensor head, which are then reflected back toward the sensor to be detected. The sensor determines the distance by measuring the time it takes for an emitted ultrasonic wave to be returned to the sensor. The sensor has 4 legs which are labeled GND, TRIG, ECHO, and VCC. The VCC pin receives the power from the 5V pin. The TRIG pin is responsible for controlling the generation of ultrasonic waves. The ECHO pin is responsible detecting the ultrasonic waves being sent back.

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.

description

Passive Buzzer: Using the diagram and code from GitHub's Tutorial C, wire up the passive buzzer along with a transistor, and a button (as seen in the diagram). Copy and paste the code into a your wus1.c file (don't forget to remove the old code before pasting). Change the “void main” to “int main”, otherwise you will get a warning (Note: you can still run the program with the “void main”, however, you will get a warning when you run the “make” command). Double check the code to make sure everything copied properly and everything makes sense logically. If not, ask Matt to help explain. Once you're sure everything is correct, run your “make” command, then “./wus1”

notes/c4eng/fall2024/projects/wus1.1731418196.txt.gz · Last modified: 2024/11/12 13:29 by mcorwin3