icon
Mr.'s Answering Machine

Scene 1: "Honey, Mommy have already heated breakfast for you in the microwave. Remember to eat it then. I will go to work first."

Scene 2: "Daddy go to work first, there is change on the table to buy breakfast, remember to do homework at home, dry the clothes in the washing machine, and be good at home."

Scene 3: "The classmates have a party tonight. I will not eat supper at home. After you have supper, remember to take your dog out for a walk."

The above scenes are what everyone may experience in daily life, so I want to make a small device to record these ordinary things.

projectImage

Recently I saw a poem:

 

When does the fish come,

it is a matter of the fish;

When does Mr. come,

it is the matter of Mr.;

When Mr. comes fishing,

it is a matter of Mr. and the fish,

and the lake of Mr. 

is the spiritual home of Mr. and the fish.

 

Therefore, Mr.'s answering machine is the spiritual home of Mr. and his family!

 

Function: When you press the first button, record for 30 seconds. Press the second time to play the 30-second recorded content.

One. Prepare the materials

HARDWARE LIST
1 Gravity: I2C Voice Recorder Module EDU
1 Gravity: LED Switch - Yellow
1 Ultra-thin sound horn
1 FireBeetle 2 ESP32-E IoT Microcontroller (Supports Wi-Fi & Bluetooth)
1 3×AA Battery Holder(PH2.0-2P)
1 FireBeetle Covers-Gravity I/O Expansion Shield
1 Jumper Wires 9" F/F (10 Pack)

Two. Production process

 

1. Connect each module as shown in the figure below

projectImage

2. Install the development board and library files

(1) Install the development board

Open Aduino and click File——Preferences——Show verbose output during, select the compilation and upload, and then copy and paste the json file URL (shown below) into the Addi tional Boards Manager URLs, then click OK at the bottom right corner of the page to close the page.

CODE
http://download.dfrobot.top/FireBeetle/package_DFRobot_index.json
projectImage

Click Tools——Board——Boards Manager, select the DFRobot AVR Boards board, click Install, and click Close in the lower right corner to close the page after the installation is complete.

projectImage
projectImage

(2) Install the recording and playback module library file: (click me to install the recording and playback library file) After decompression, drag the library file into the Arduino-libraries file directory.(Click me to teach you to install the library file)

(3) Burning procedure

CODE
#include "DFRobot_VoiceRecorder.h"
 
#define I2C_ADDRESS  (0x30)
DFRobot_VoiceRecorder_I2C voicerecorder(&Wire, I2C_ADDRESS);
uint8_t buttonPin=D10; 
bool playing=false;
void record(){
  if((digitalRead(buttonPin)==HIGH)&&(playing==false))//When you press the button
 {
  voicerecorder.setVoiceNumber(VOICE_NUMBER_2);//Select Audio NO.2
  voicerecorder.deleteVoice();
  Serial.println("Delete Voice");
  voicerecorder.recordvoiceStart();
  Serial.println("Recode Start");
  for (int8_t n = 20; n > 0; n--)
  {
    Serial.println(n);
    delay(1000);
  }
  voicerecorder.recordVoiceEnd();//Recode End
  Serial.println("Recode End");
  playing=true;
  }
}
void play(){
  if((digitalRead(buttonPin)==LOW)&&(playing==true))//release the button
  {
  voicerecorder.setVoiceNumber(VOICE_NUMBER_2);//Select Audio NO.2
  voicerecorder.playVoiceStart();
  Serial.println("play recording");
  for (int8_t n = 22; n > 0; n--)
  {
    Serial.println(n);
    delay(1000);
  }
  playing=false;
  }
}
void setup() {
  pinMode(buttonPin,INPUT);  
  Serial.begin(115200);
  while (voicerecorder.begin() != 0)
  {
    Serial.println("i2c device number error!");
    delay(1000);
  }
  Serial.println("i2c connect success!");
}
void loop() {
  record();
  play();
}

Three. Assembly

 

1. Design the shell and cut it with a wooden board

(The model file is here---appearance cutting drawing)

projectImage

2. Assembly appearance

Topic: How many steps does it take to put an elephant in a refrigerator? 

Step 1: Open the refrigerator door

projectImage

Step 2: Put the elephant in

projectImage

Step 3: Close the refrigerator door

projectImage

Okay, now the elephant is in this small box. It seems to be very angry and its nose is red with anger.

projectImage

Now tell the elephant what you want to say the most, and it will keep it secret until the person presses the button to let the elephant tell him/her.

License
All Rights
Reserved
licensBg
0