Arduino Tone Generator

16,084

92

2

About: Hi, I just launched an Indigogo campaign support my projects by backing it. https://www.indiegogo.com/projects/tinker-usb-a-wifi-based-badusb#/

Intro: Arduino Tone Generator

The best way to learn about the Arduino is to play with the basic examples in the Arduino IDE. In this instructable I'm going to show you how to generate a melody from an Arduino. The Arduino might not have enough ram to stream music but it has sufficient ram to generate some common melody.

Note- An Arduino is not capable handling a speaker on its own, so an external amplifier is required.

So lets get started....

Step 1: Tools and Components

All that you need for this instructable is -

  • Arduino UNO
  • A Speaker with an amplifier
  • Alligator clips
  • Jumper wires

Step 2: Circuit

Well, there is not much of a circuit all you need is to clip the alligator clips as shown in the picture and connect one of the clips to Arduino ground and the other to Digital pin 8, with the help of some jumper wires. Make sure you do not touch the 3.5mm wire when the speaker is ON.

Step 3: Code

The code for a test melody can be found in the Arduino IDE under examples => digital => tone melody. The tone will only stream once you can run it again by hitting the reset button.

Or just copy the code below and paste it in the IDE.

Share

Recommendations

  • Optics Contest

    Optics Contest
  • Audio Contest 2018

    Audio Contest 2018
  • Electronics Tips & Tricks Challenge

    Electronics Tips & Tricks Challenge

2 Discussions

0
None
R Jordan Kreindler

2 years ago

Thanks for this post. I will give it a try as it seems very "straight forward".

0
None
sspence

3 years ago on Introduction

The Arduino can drive a speak all on it's own, very easily. It's got quite a bit of volume.