查看“Electronic Greeter”的源代码
←
Electronic Greeter
跳转至:
导航
、
搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{Language| Electronic Greeter}} {| style="width: 800px;" |- | ==Objective== This Electronic Greeter will play happy music when someone walking by. [[File: Electronic_greeting-music.jpg|600px|center]] ==Schematic== Microduino-PIR sensor will detect if there is someone moving. If there is, this device will get lighten and play music, which lasts for a while and then stop. [[File: Electronic_greeting-sch.jpg|600px|center]] ==Equipment== {|class="wikitable" |- |Module||Number||Function |- |[[mCookie-CoreUSB]]||1||Core board |- |[[mCookie-Hub]]||1||Sensor pin board |- |[[ mCookie-Audio]]||1||Audio module |- |[[ mCookie-Amplifier]]||1||Amplifier module |- | [[mCookie-BM]]||1||Battery management |- | [[Microduino-PIR]]||1||Pyroelectric Infrared Radiation sensor |- | [[Microduino-Color led]]||1||Colored light |} *Other Equipment **Two Loudspeakers **One cell of battery [[File: Electronic_greeting-module1.jpg|600px|center]] [[File: Electronic_greeting-module2.jpg|600px|center]] ==Program Download== *Setup 1:Connect CoreUSB and PC/Mac with an USB cable, and open Arduino IDE. [[Image:CoreUSB_Ble_pc.jpg|600px|center]] *Setup 2:Click file>example>> mCookie > _204_JoyfulGreeter. [[File: Electronic_greeting-upload2.jpg|600px|center]] *Setup 3:Select the right board card and COM port, then download the program. [[File: Electronic_greeting-upload3.jpg|600px|center]] ==Software Debugging== *Function description: **” audio.h”(File that controls Audio to play music.) **“colorWipe()”(Function to control LED color.) *Serial port usage of the Audio module needs to be decided jumpers on the board. Default Serial (2,3) <source lang="cpp"> #include <SoftwareSerial.h> SoftwareSerial mySerial(2, 3); // RX, TX //#define AUDIO_PORT Serial1 //Core+ #define AUDIO_PORT mySerial //Core</source> * Control pin description <source lang="cpp"> #define humanHotSensor 4//PIR sensor D4 #define PIN 6//Colored light </source> *Send serial instruction to control Audio by detecting human movement via PIR. <source lang="cpp"> if (humanHotState) { colorWipe(strip.Color(125, 125, 125));//The colored light is on if (!playing) { Serial.println("play sound....."); // audio_play(); audio_choose(1);//Play audio playing = true; } } else { playing = false; //audio_pause(); Serial.println("stop sound....."); colorWipe(strip.Color(0, 0, 0)); } </source> ==Hardware Buildup== *Setup1:Connect PIR sensor to D4 pin of Sensorhub and colored light to D6 pin. [[file: Electronic_greeting_setup_1.jpg |600px|center]] For connection method, please refer to the following picture. Mind connection order, which starts from LED interface IN to Out. It can control six LED lights at most. [[File:CoreUSB_Ble_steup11.jpg|600px|center]] *Setup 2:Insert TF into AudioShield. [[File: _MusicBox_Joystick _TF.jpg|600px|center]] *Setup 3:Stack AudioSheild and Audio together for TF card reader use. Connect PC via Auido, you can save music into TF card. Here it can only save one piece of music and the play duration shouldn't be long. *Setup4:Connect two loudspeakers to Amplifier and stack Audio, AudioShield and Amplifier. [[file: Electronic_greeting _3_speak.JPG|600px|center]] *Setup5:Connect the activated battery box to BM. [File:CoreUSB_Ble_steup2.jpg|600px|center]] *Setup6:Stack all the modules without fixed order (Except that Audio, AudioShield and Amplifier should be stacked together.) [[file: Electronic_greeting _steup_ok.JPG|600px|center]] ==Result== When it detects someone moves, the colored led will turn on and play music. You can build a beautiful frame with LEGO. [[file: Electronic_greeting _legao-ok.JPG|600px|center]] ==Video== |}
该页面使用的模板:
模板:Language
(
查看源代码
)
模板:Nmbox
(
查看源代码
)
返回至
Electronic Greeter
。
导航菜单
个人工具
创建账户
登录
名字空间
页面
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
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
帮助
常见问题
帮助
工具
链入页面
相关更改
特殊页面
页面信息