0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

圧電ブザーを鳴らせてみよう(Arduino Modulino Buzzer(STM32C011))

Last updated at Posted at 2025-11-12

参考

結果(鳴った)

イメージ

Screenshot from 2025-11-03 06-17-01.png

プログラム


int melo = 200;   // 音の長さを指定
int pin = 0;     // ブザーを接続したピン番号

void setup() {
}

void loop() {
     tone(pin,262,melo) ;  // ド
     delay(melo) ;         // 音がなっている間待機
     tone(pin,294,melo) ;  // レ
     delay(melo) ;
     tone(pin,330,melo) ;  // ミ
     delay(melo) ;

     delay(1000) ;         // 1秒待機
}


0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?