Difference between revisions of "Voice Control Electric Fan"

From Microduino Wiki
Jump to: navigation, search
(Created page with "{{Language|Voice Control Fan}} {| style="width: 800px;" |- | ==Objective== To have a voice control of the electric fan and the louder your voice becomes, the faster the fan ro...")
 
(Equipment)
Line 17: Line 17:
 
|[[Microduino-Sensorhub]]||1||Sensor pin board  
 
|[[Microduino-Sensorhub]]||1||Sensor pin board  
 
|-
 
|-
|[[Microduino-MIC]]||1||Sound detection sensor
+
|[[Microduino-Sound]]||1||Sound detection sensor
 
|-
 
|-
 
|[[Microduino-Fan]]||1||Electric fan  
 
|[[Microduino-Fan]]||1||Electric fan  

Revision as of 01:38, 25 January 2016

Language: English  • 中文

Objective

To have a voice control of the electric fan and the louder your voice becomes, the faster the fan rotates.

Principle

Equipment

Module Number Function
Microduino-CoreUSB 1 Core board
Microduino-Sensorhub 1 Sensor pin board
Microduino-Sound 1 Sound detection sensor
Microduino-Fan 1 Electric fan
Microduino-BM 1 Battery management

Hardware Buildup

  • Setup 1:Connect the CoreUSB to the computer, open the program examples, select the right board and download the program.
  • Setup2:Connect the MIC module to the A2 pin of the Sensorhub and the Fan to the D6 pin.
Microduino-sensorhub rule.JPG
  • Setup6:Connect the battery to the BM module.

Software Debugging

Code Description

  • Define the control pin
#define motor_pin 6

int micPin = A2; 
int micValue=0;
bool isRoar=false;

Result

You can have a voice control of the fan and the louder your voice becomes, the faster the fan rotates.

Video