블로그 이미지
Leeway is... the freedom that someone has to take the action they want to or to change their plans.
maetel

Notice

Recent Post

Recent Comment

Recent Trackback

Archive

calendar

1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
  • total
  • today
  • yesterday

Category

'Coding'에 해당되는 글 1건

  1. 2007.11.06 DIY Arduino Digital Music Instrument - Day 2
2007. 11. 6. 21:47 Footmarks
Memory
Bootloader


Reset Button
ATmega8


Microprocessor


Arduino API (Programming)




sound
Frequency <=> Time




int val = 2000;

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

void playNote(int val) {
{
  for(int c = 0; c < 100; c++) {
    digitalWrite(9, HIGH);    //sets the LED on
    delayMicroseconds(val);    //waits for a second
    digitalWrite(9, LOW);    //sets the LED off
    delayMicroseconds(val);    //waits for a second
  }
  delay(500);
}

void loop()
{
  playNote(200);
  playNote(400);
  playNote(600);
}


조교
권아름   arum.kwon(at)gmail.com
석근국   kg.seok(at)hmail.com
SADI 제품디자인과

posted by maetel