Difference between revisions of "Fortune Cat"

From Microduino Wiki
Jump to: navigation, search
(Hardware Buildup)
 
(5 intermediate revisions by 3 users not shown)
Line 4: Line 4:
 
|
 
|
 
==Overview==
 
==Overview==
When someone passed by, Fortune cats eyes shine waving
+
When you pass by, the Fortune Cat will wave to you with two eyes shining and meow.  
 
 
to you, will wow oh.
 
 
[[File: MicroduinoFortuneCat-stater.jpg|600px|center]]
 
[[File: MicroduinoFortuneCat-stater.jpg|600px|center]]
  
Line 23: Line 21:
 
|Module||Number||Function
 
|Module||Number||Function
 
|-
 
|-
|[[mCookie-CoreUSB/zh]]||1||Core board
+
|[[mCookie-CoreUSB]]||1||Core board
 
|-
 
|-
|[[mCookie-Hub/zh]]||1||sensor hub board
+
|[[mCookie-Hub]]||1||sensor hub board
 
|-
 
|-
|[[Microduino-TOUCH/zh]]||1||touch sensor
+
|[[Microduino-TOUCH]]||1||touch sensor
 
|-
 
|-
|[[Microduino-PIR/zh]]||1||PIR sensor
+
|[[Microduino-PIR]]||1||PIR sensor
 
|-
 
|-
|[[mCookie-Audio/zh]]||1||Audio module
+
|[[mCookie-Audio]]||1||Audio module
 
|-
 
|-
|[[mCookie-Amplifier/zh]]||1||Power Amplifier module
+
|[[mCookie-Amplifier]]||1||Power Amplifier module
 
|-
 
|-
|[[Microduino-Color led/zh]]||2||led light
+
|[[Microduino-Colored LED]]||2||led light
 
|-
 
|-
| [[mCookie-BM/zh]]||1||Battery Management
+
| [[mCookie-BM]]||1||Battery Management
 
|-
 
|-
 
| Servo||1||Servo
 
| Servo||1||Servo
Line 43: Line 41:
 
|}
 
|}
 
[[File: MicroduinoFortuneCat-module.jpg|600px|center]]
 
[[File: MicroduinoFortuneCat-module.jpg|600px|center]]
[[File: MicroduinoFortuneCat-module1.jpg|600px|
+
[[File: MicroduinoFortuneCat-module1-E.jpg|600px|
  
 
center]]
 
center]]
Line 52: Line 50:
 
and then start the Arduino IDE.
 
and then start the Arduino IDE.
 
[[File:CoreUSB_Ble_pc.jpg|600px|center]]
 
[[File:CoreUSB_Ble_pc.jpg|600px|center]]
*Setup 2:点击Files > Examples > mCookie >  
+
*Setup 2:Click Files > Examples > mCookie >  
  
 
_303_FortuneCat.
 
_303_FortuneCat.
Line 62: Line 60:
 
successfully been uploaded into the CoreUSB.
 
successfully been uploaded into the CoreUSB.
 
[[File: _303_FortuneCat -com.jpg|600px|center]]
 
[[File: _303_FortuneCat -com.jpg|600px|center]]
 +
 
==Program description==
 
==Program description==
 
*Control pin definitions
 
*Control pin definitions
Line 97: Line 96:
 
module.
 
module.
 
[[file: MicroduinoFortuneCat2-hub.JPG|600px|center]]
 
[[file: MicroduinoFortuneCat2-hub.JPG|600px|center]]
To connect muliple LEDs in a series, follow the above  
+
To connect multiple LEDs in a series, follow the above  
  
 
diagram. Notice that the sensor cable connects to the IN  
 
diagram. Notice that the sensor cable connects to the IN  
Line 137: Line 136:
  
 
==Result==
 
==Result==
If someone passby Fortune cat, she will wave to you, eyes will light up and beep.
+
When you pass by, the Fortune Cat will wave to you with two eyes shining and meow.
 
[[File: MicroduinoFortuneCat_steup-legao.jpg|600px|
 
[[File: MicroduinoFortuneCat_steup-legao.jpg|600px|
  

Latest revision as of 09:28, 4 August 2017

Language: English  • 中文

Overview

When you pass by, the Fortune Cat will wave to you with two eyes shining and meow.

MicroduinoFortuneCat-stater.jpg

Schematic

The body will send pyroelectric infrared, sensor can

detects it, when the sensor detects, will control lights

change color, and the Audio module to play audio.

MicroduinoFortuneCat-sch-E.jpg

Equipment

Module Number Function
mCookie-CoreUSB 1 Core board
mCookie-Hub 1 sensor hub board
Microduino-TOUCH 1 touch sensor
Microduino-PIR 1 PIR sensor
mCookie-Audio 1 Audio module
mCookie-Amplifier 1 Power Amplifier module
Microduino-Colored LED 2 led light
mCookie-BM 1 Battery Management
Servo 1 Servo
MicroduinoFortuneCat-module.jpg
MicroduinoFortuneCat-module1-E.jpg

Preparation

  • Setup 1:Connect the CoreUSB module to your computer

and then start the Arduino IDE.

CoreUSB Ble pc.jpg
  • Setup 2:Click Files > Examples > mCookie >

_303_FortuneCat.

L 303 FortuneCat -ino.jpg
  • Setup 3:Click upload to upload the program. When

"Done Uploading" appears, the program should have

successfully been uploaded into the CoreUSB.

303 FortuneCat -com.jpg

Program description

  • Control pin definitions
#define humanHotSensor 4//PIR sensor pin number
#define PIN 6//color light pin number
#define SERVOPIN SDA//servo pin

Adafruit_NeoPixel strip = Adafruit_NeoPixel(1, PIN, 

NEO_GRB + NEO_KHZ800);
  • Detection of human IR and play audio, control servos
if (humanHotState) {
    colorWipe(strip.Color(125, 125, 125));
    updateServo();

    if (!playing) {
      Serial.println("play sound.....");
     // audio_play();
     audio_choose(1);
      playing = true;
    }
  }

Hardware Buildup

  • Setup 1:Using the below diagram as reference, connect

the sensors into the corresponding ports on the Hub

module.

MicroduinoFortuneCat2-hub.JPG

To connect multiple LEDs in a series, follow the above

diagram. Notice that the sensor cable connects to the IN

ports of the LEDs. You can support up to six LEDs!

CoreUSB Ble steup11.jpg
  • Setup2:Connect the servo to the Servo Connector. Then

connect that to the IIC port in the Hub module.

MicroduinoFortuneCat2-hub-servo.JPG
  • Setup 3:Insert a micro SD Card into the Audio Shield.
MusicBox Joystick TF.jpg
  • Setup 4:Stack the Audio Shield and Audio modules.

Then, copy a single greeting sound onto the micro SD card.

MusicBox Joystick song.jpg
  • Setup 5:Connect two speakers to Amplifier module.
MusicBox Joystick song speak.JPG
  • Setup 6:Stack the Amplifier, Audio, and Audio Shield

modules.

MusicBox Joystick 3 speak E.JPG
  • Setup 7:Connect the activated Battery module to your

battery Management module.

CoreUSB Ble steup2.jpg
  • Setup 8:All modules are stacked together, in any order

(except Audio, AudioShield and Amplifier three together),

Congratulation, the circuit part to build complete!

MicroduinoFortuneCat steup-ok-E.jpg

Result

When you pass by, the Fortune Cat will wave to you with two eyes shining and meow.

MicroduinoFortuneCat steup-legao.jpg

Video