DFRobot DFR0699 Manual - Página 9
Procurar online ou descarregar pdf Manual para Unidade de controlo DFRobot DFR0699. DFRobot DFR0699 20 páginas.
#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