DFRobot DFR0699 Manual - Halaman 14

Jelajahi secara online atau unduh pdf Manual untuk Unit Kontrol DFRobot DFR0699. DFRobot DFR0699 20 halaman.

DFRobot DFR0699 Manual
#include "DFRobot_VoiceRecorder.h"
#define I2C_ADDRESS
(0x30)
DFRobot_VoiceRecorder_I2C voicerecorder(&Wire, I2C_ADDRESS);
uint32_t a[3] = {0, 0, 1};
void setup()
{
Serial.begin(115200);
while (voicerecorder.begin() != 0)
{
Serial.println("i2c device number error!");
delay(1000);
}
Serial.println("i2c connect success!");
}
void loop()
{
Serial.println(String(a[2]));
voicerecorder.VoiceSynthesis(CHINESE_LANGUAGE, String(a[2]), VOICE_REPLACE_MODE);
a[0] = a[1], a[1] = a[2];
a[2] = a[0] + a[1];
while (voicerecorder.getNowState() != VOICE_NONE);
delay(3000);
}
//I2C Address