Difference between revisions of "Lesson 45--Microduino Electric Guitar"
(Created page with "{| style="width: 800px;" |- | ==Objective== This tutorial will show you how to use ultrasonic sensor to make an electric guitar. ==Equipment== *'''Microduino-Core''' *''...") |
|||
(One intermediate revision by the same user not shown) | |||
Line 15: | Line 15: | ||
**10KΩ resistor One | **10KΩ resistor One | ||
**Breadboard jumpers several | **Breadboard jumpers several | ||
− | ** | + | **Battery One |
==Note Frequency== | ==Note Frequency== | ||
− | We all know that the notes Do - Re - Mi - Fa - Sol - La - Si/Te have their | + | We all know that the notes Do - Re - Mi - Fa - Sol - La - Si/Te have their corresponding frequencies, seeing at the two tables below: |
[[File:NoteFrequency1.jpg|600px|center|thumb]] | [[File:NoteFrequency1.jpg|600px|center|thumb]] | ||
Line 49: | Line 49: | ||
[[File:ElectricGuitarConnect.jpg|600px|center|thumb]] | [[File:ElectricGuitarConnect.jpg|600px|center|thumb]] | ||
− | You can mark the location of notes | + | You can mark the location of notes according to note frequency on the battery. |
3. Download and run the code | 3. Download and run the code | ||
− | 4. | + | 4. Move the obstruction in front of ultrasonic and pay attention to the loudspeaker. |
==Result== | ==Result== | ||
− | The loudspeaker will generate different notes according to different locations of the obstruction, which is basically the same with the note on the | + | The loudspeaker will generate different notes according to different locations of the obstruction, which is basically the same with the note on the battery. |
Latest revision as of 09:12, 12 September 2016
ContentsObjectiveThis tutorial will show you how to use ultrasonic sensor to make an electric guitar. Equipment
Note FrequencyWe all know that the notes Do - Re - Mi - Fa - Sol - La - Si/Te have their corresponding frequencies, seeing at the two tables below:
Schematic
ProgramIn the program,int toneFrequency[]={415,440,466,494,523,554,587,622}; It is used to define the range and number that can generate notes. You can adjust the note frequency range according to individual needs.
Debugging1. Download Tone library: Tone, and put it into libraries of IDE and then restart IDE. Compared with the built-in Tone, this Tone library can output waves with different frequency at the same time.
2. Build the circuit according to schematic: You can mark the location of notes according to note frequency on the battery. 3. Download and run the code 4. Move the obstruction in front of ultrasonic and pay attention to the loudspeaker. ResultThe loudspeaker will generate different notes according to different locations of the obstruction, which is basically the same with the note on the battery.
Video |