Buzzer

A buzzer will emit a sound.
Information

Type : Output

Mode : Digital

Pins : 0-14

Tutorial : funduino

Note: Use tone(buzzer, 1000) to set the tone height.

Image by funduino, CC-BY-SA.

Connection scheme

Scheme made with Fritzing.

Functions

On

On State

Switches the component on.

void function_0_buzzer(){
digitalWrite(pin_0_buzzer, HIGH);
function_0_buzzer();
}
  
digitalWrite(pin_0_buzzer, HIGH);
  
void function_0_buzzer(){
digitalWrite(pin_0_buzzer, HIGH);
state = 1;
}
  

Off

Off State

Switches the component off.

void function_0_buzzer(){
digitalWrite(pin_0_buzzer, LOW);
function_0_buzzer();
}
  
digitalWrite(pin_0_buzzer, LOW);
  
void function_0_buzzer(){
digitalWrite(pin_0_buzzer, LOW);
state = 1;
}
  

Last modified April 6, 2022: added component translations (dd86b1f)