forked from zephyrproject-rtos/ArduinoCore-zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.cpp
More file actions
44 lines (38 loc) · 774 Bytes
/
app.cpp
File metadata and controls
44 lines (38 loc) · 774 Bytes
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
32
33
34
35
36
37
38
39
40
41
42
43
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright (c) 2026 TOKITA Hiroshi
*/
#include <Arduino.h>
#include "zephyrSerial.h"
#define NOTE_C4 262
#define NOTE_D4 294
#define NOTE_E4 330
#define NOTE_F4 349
#define NOTE_G4 392
#define NOTE_A4 440
void setup() {
Serial.begin(115200);
}
void loop() {
Serial.println("Do@D4");
tone(D4, NOTE_C4, 1000);
delay(2000);
Serial.println("Re@D4");
tone(D4, NOTE_D4, 1000);
delay(2000);
Serial.println("Mi@D4 - Infinity");
tone(D4, NOTE_E4, 0);
delay(2000);
Serial.println("Fa@D5");
tone(D5, NOTE_F4, 1000);
delay(2000);
Serial.println("So@D5");
tone(D5, NOTE_G4, 1000);
delay(2000);
Serial.println("La@D5 - Infinity");
tone(D5, NOTE_A4, 0);
while(true) {
delay(1000);
}
}