LoginSignup
0
0

More than 3 years have passed since last update.

[sketch][Arduino]ブザーの音程を、段階的に上げていくサンプル

Posted at

動作の様子

今回の動作は音になるので、こちらをご確認頂けると良いかと思います。

コード

#define SPK_PIN 9

void setup() {
  pinMode(SPK_PIN, OUTPUT);

}

void loop() {

  int i;
  for (i = 0; i < 256; i++) {
    tone(SPK_PIN, i*10, 50);
    delay(20);
  }
}
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