User manual

IDUINO for maker’s life
www.openplatform.cc
3 Example
Note that this example need to use LilyPad ATmega 328 board ,not arduino UNO
board.
********Code begin********
/******************************************************************************
LilyPad Buzzer Example
This example code shows how to hook up a LilyPad Buzzer to play a simple song
using the tone() function and setting variables for each note.
Buzzer connections:
* + pin to 5
* - to -
******************************************************************************/
// Which pin the buzzer is attached to
int buzzerPin = 5;
// Delay in milliseconds
int delayTime = 500;
// Notes and their frequencies
const int C = 1046;
const int D = 1175;
const int E = 1319;
const int F = 1397;
const int G = 1568;
const int A = 1760;
const int B = 1976;
const int C1 = 2093;
const int D1 = 2349;
void setup()
{
// Set the buzzer pin as an OUTPUT
pinMode(buzzerPin, OUTPUT);
}