查看“Lesson 45--Microduino Electric Guitar”的源代码
←
Lesson 45--Microduino Electric Guitar
跳转至:
导航
、
搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{| style="width: 800px;" |- | ==Objective== This tutorial will show you how to use ultrasonic sensor to make an electric guitar. ==Equipment== *'''[[Microduino-Core]]''' *'''[[Microduino-USBTTL]]''' *Other harware equipment **USB cable One **Ultrasonic sensor One **Loudspeaker One **10KΩ resistor One **Breadboard jumpers several **Battern One ==Note Frequency== We all know that the notes Do - Re - Mi - Fa - Sol - La - Si/Te have their correspsonding frequencies, seeing at the two tables below: [[File:NoteFrequency1.jpg|600px|center|thumb]] [[File:NoteFrequency2.jpg|600px|center|thumb]] ==Schematic== [[File:ElectricGuitarSchematics.jpg|600px|center|thumb]] ==Program== [https://github.com/Microduino/Microduino_Tutorials/tree/master/Microduino_Advanced/guitar guitar] In 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. ==Debugging== 1. Download Tone library: [https://github.com/johnmccombs/arduino-libraries/tree/master/Tone 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. '''Caution: Decompress and change #include <wiring.h> in Tone.cpp to #include <Arduino.h>, or it'll cause errors. 2. Build the circuit according to schematic: [[File:ElectricGuitarConnect.jpg|600px|center|thumb]] You can mark the location of notes accordin to note frequency on the battern. 3. Download and run the code 4. move the obstruction in front of ultrasonic and pay attention to the loudspeaker. ==Result== The loudspeaker will generate different notes according to different locations of the obstruction, which is basically the same with the note on the battern. ==Video== |}
返回至
Lesson 45--Microduino Electric Guitar
。
导航菜单
个人工具
创建账户
登录
名字空间
页面
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
Welcome
首页
创客大赛
大赛详情
3D打印
安装月球车
图形化编程
操控月球车
升级月球车
编程工具下载
软件下载
Arduino
Processing
Mixly
Scratch
模块套件
Microduino 102
mCookie 102
mCookie 202
mCookie 302
IBC
其他
应用套件
四轴飞行器
平衡车
小车CUBE
音乐播放器
刷卡音乐播放器
wifi气象站
彩虹音乐触摸灯
分贝检测仪
迎门汇报
LED点阵时钟
LED点阵屏幕
硬件
mCookie
Sensor
Microduino
MicroWrt
MicroNux
MicroRobot-Core
MicroRobot-CoreESP
ideaBoard
ideaBox
MicroMV
MicroAI
帮助
常见问题
帮助
工具
链入页面
相关更改
特殊页面
页面信息