DFRobot DFR0699 Manual - Page 9
Browse online or download pdf Manual for Control Unit DFRobot DFR0699. DFRobot DFR0699 20 pages.
#include "DFRobot_VoiceRecorder.h"
#define I2C_ADDRESS
(0x30)
DFRobot_VoiceRecorder_I2C voicerecorder(&Wire, I2C_ADDRESS);
void setup() {
Serial.begin(115200);
while (voicerecorder.begin() != 0)
{
Serial.println("i2c device number error!");
delay(1000);
}
Serial.println("i2c connect success!");
}
void loop() {
for (uint8_t voiceNum = 0; voiceNum < 10; voiceNum++)
{
voicerecorder.setVoiceNumber(voiceNum);
Serial.println("setVoiceNumber " + String(voiceNum));
if (VOICE_NONE == voicerecorder.playVoiceStart())
{
Serial.println(String(voiceNum) + " is empty");
delay(3000);
continue;
}
//I2C Address
//Set number
//Start playing, and check if it is empty
//Enter the next number if it is empty