mirror of
https://github.com/brmlab/brmdoor.git
synced 2025-06-09 04:04:02 +02:00
use macro for music
This commit is contained in:
parent
e8aac914fc
commit
860e129b93
1 changed files with 5 additions and 1 deletions
|
@ -1,5 +1,7 @@
|
||||||
// get file cardids.h from the Council section in our wiki!
|
// get file cardids.h from the Council section in our wiki!
|
||||||
|
|
||||||
|
#define MUSIC 1
|
||||||
|
|
||||||
// if you are running Arduino0018 or older, comment the SPI.h include
|
// if you are running Arduino0018 or older, comment the SPI.h include
|
||||||
#include <SPI.h>
|
#include <SPI.h>
|
||||||
#include <Ethernet.h>
|
#include <Ethernet.h>
|
||||||
|
@ -28,7 +30,8 @@ struct ACLdata {
|
||||||
// run telnet server
|
// run telnet server
|
||||||
Server server(23);
|
Server server(23);
|
||||||
|
|
||||||
#if 1
|
#if MUSIC
|
||||||
|
|
||||||
#include "pitches.h"
|
#include "pitches.h"
|
||||||
|
|
||||||
int melody_nak[] = { NOTE_G5, NOTE_G5, NOTE_G5, NOTE_DS5, NOTE_AS5, NOTE_G5, NOTE_DS5, NOTE_AS5, NOTE_G5};
|
int melody_nak[] = { NOTE_G5, NOTE_G5, NOTE_G5, NOTE_DS5, NOTE_AS5, NOTE_G5, NOTE_DS5, NOTE_AS5, NOTE_G5};
|
||||||
|
@ -70,6 +73,7 @@ void playMelodyNak()
|
||||||
{ playMelody(melody_nak, noteDurations_nak, sizeof(melody_nak)/sizeof(melody_nak[0])); }
|
{ playMelody(melody_nak, noteDurations_nak, sizeof(melody_nak)/sizeof(melody_nak[0])); }
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
void playMelodyAck()
|
void playMelodyAck()
|
||||||
{}
|
{}
|
||||||
void playMelodyNak()
|
void playMelodyNak()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue