1
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?

More than 5 years have passed since last update.

アクティブブザーの使い方(TMB12A05)

Posted at

TMB12A05を使ったので忘れないようにメモ
Arduino UNO チュートリアル: サインスマートのプロジェクト練習教本

より引用

アクティブブザー:
いわゆるブザーで、電気を流すだけでピーと音が鳴ります。digitalWrite() で ON/OFF して制御します。

## 配線
IMG_1941.jpg

TMB12A05について

IMG_1942.jpg
IMG_1943.jpg

コード


void setup() {
  pinMode(13, OUTPUT);    // sets the digital pin 13 as output
}

void loop() {
  digitalWrite(13, HIGH); // sets the digital pin 13 on
  delay(1000);            // waits for a second
  digitalWrite(13, LOW);  // sets the digital pin 13 off
  delay(1000);            // waits for a second
}

結果 

ピーってなり続ける

参考文献

Arduino 公式 digitalWrite()

Arduino UNO チュートリアル: サインスマートのプロジェクト練習教本

1
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
1
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?