Subscribe

higepon blog

2014-09-25

11. Piezo Buzzer - Spark Core

spark core

Buzzer would be useful in some cases, so let’s learn how to use it.
I started using Fritzing to draw how I connect things.

f:id:higepon:20140924085114p:image:w640

And code is below

// Turn on/off Piezo Buzzar
//  

void setup() {
  Serial.begin(9600);
  pinMode(A0, OUTPUT);
}

void loop() {
  delay(1000);
  analogWrite(A0, 2000);
  delay(100);
  analogWrite(A0, 0);
}

higepon 2014-09-25 00:52

Bookmark this entry on Hatena::Bookmark
Tweet
Remove all ads
  • Read more
Write a comment
« 12.Force-Sensitive Resistor - Spark Co… 10. Daddy is coming home app for iPhon… »
Profile
id:higepon id:higepon
Subscribed unsubscribe Subscribe Subscribe
About this blog
Search
Links
  • Hatena Blog
  • ブログをはじめる
  • Weekly Hatena Blog
  • Hatena Blog Pro
Recent Entries
  • 2022年振り返り
  • How GC in unsafe loxido works
  • Finalize, Sweep and Rooting - Understanding Rust GC
  • Trace - Understanding Rust GC
  • Mosh compiler/VM のデバッグを1週間続けた話
Archive

Start using Hatena Blog!

higepon is using Hatena Blog. Would you like to try it too?

Start using Hatena Blog (Free)
What is Hatena Blog?
higepon blog higepon blog

Powered by Hatena Blog | ブログを報告する

Quote saved.

Login to quote this blog

Failed to save quote. Please try again later.

You cannot quote because this article is private.

Subscribed unsubscribe Subscribe Subscribe