Last active
October 28, 2019 07:21
-
-
Save RobolinkAkademi/06124b541be133e9289f6dbc386635b7 to your computer and use it in GitHub Desktop.
tum_yil_icin_arduino_mufredati_26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "pitches.h" | |
int F = 10; | |
ing G = 11; | |
int A = 12; | |
int B = 13; | |
int f[] = {NOTE_F5}; | |
int g[] = {NOTE_G5}; | |
int a[] = {NOTE_A5}; | |
int b[] = {NOTE_B5}; | |
int duration(500); | |
void setup() { | |
pinMode(F, INPUT_PULLUP); | |
pinMode(G, INPUT_PULLUP); | |
pinMode(A, INPUT_PULLUP); | |
pinMode(B, INPUT_PULLUP); | |
void loop() { | |
if (digitalRead(F) == LOW) { | |
for (int Note = 0; Note <1; Note++) | |
{ | |
tone(6, f[Note], duration); | |
} | |
} | |
if (digitalWrite(G) == LOW) { | |
for (int Note = 0; Note < 1; Note++) { | |
tone(6, g[Note], duration); | |
} | |
} | |
if (digitalRead(A) == LOW) { | |
for (int Note = 0; Note < 1; Note++) { | |
tone(6, b[Note], duration); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment