User Tools

Site Tools


notes:c4eng:fall2024:projects:wus1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
notes:c4eng:fall2024:projects:wus1 [2024/11/14 02:56] – [WUS1] cnicho20notes:c4eng:fall2024:projects:wus1 [2024/11/14 04:37] (current) – [WUS1] dnayo
Line 13: Line 13:
 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 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
 {{:notes:c4eng:fall2024:projects:wus1.jpg?400|}} {{:notes:c4eng:fall2024:projects:wus1.jpg?400|}}
 +
 +**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's Freenove Tutorial page. Then, edit your wus1 file according to the sample commands given to you by the named files, but make sure mot to copy them exactly if you want your components to interact with each other. If you want to Joystick and the servo to interact, make sure that the OUTPUT is the servo, and the INPUT is the Joystick and the buttons, as the buttons and Joystick are what will allow you to manipulate the servo as you'd like. Make sure your components are also hooked up to the appropriate GPIO pins and power supplies with the correct resistors (if needed). The goal is the have the servo rotate independent of any input until you push one of the buttons, which will make it stop, so you'll need to loop the servo command until the condition of the first button being pressed is met. Then, when the second button is pressed, and held down, you should be able to manipulate the servo using the Joystick as a reference for what angle you'd like the servo to rotate towards/away from, hence why the servo is the OUTPUT and the Joystick is the INPUT. Once the second button is released, you should have a code that will let the servo spin automatically until you push the first button again.
 =====project idea===== =====project idea=====
  
notes/c4eng/fall2024/projects/wus1.1731552967.txt.gz · Last modified: 2024/11/14 02:56 by cnicho20