Introduction: Electronic Organ

Picture of  Electronic Organ

Hello, Everyone. This is a series of courses, I will share how to use cartons and arduino to make something interesting,today,I'll share with you a Electronic Organ.The project is relatively simple, so according to the steps produced is not too difficult.

Step 1: You Need to Prepare These Materials

Picture of You Need to Prepare These Materials

Step 2: Circuit Diagram

Picture of Circuit Diagram

Step 3: Assembly

Picture of Assembly

Step 4: Code

void setup()

{

pinMode(1, INPUT);

pinMode(13, OUTPUT);

pinMode(2, INPUT);

pinMode(3, INPUT);

pinMode(4, INPUT);

pinMode(5, INPUT);

pinMode(6, INPUT);

pinMode(7, INPUT);

}

void loop()

{

analogWrite(10,1);

if (digitalRead(1)) {

tone(13,262);

} else if (digitalRead(2)) {

tone(13,294);

} else if (digitalRead(3)) {

tone(13,330);

} else if (digitalRead(4)) {

tone(13,349);

} else if (digitalRead(5)) {

tone(13,392);

} else if (digitalRead(6)) {

tone(13,440);

} else if (digitalRead(7)) {

tone(13,494);

} else {

noTone(13);

}

}

Step 5: GameRules

Picture of GameRules

Press a button and the electronic organ makes a sound.

These seven buttons correspond to DO,RE,MI,FA,SUO,LA,XI

Comments

DIY Hacks and How Tos (author)2017-12-02

Awesome. Electronic organs like this were some of my first projects when I was starting to learn electronics.

About This Instructable

595views

10favorites

License:

More by Rosamking:Rock-paper-scissors Robot  Laser Fighting Robot Electronic Organ
Add instructable to: