1 Star 0 Fork 0

DFRobot / DFRobot_DF1101S

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

DFRobot_DF1101S

您是否在寻找一款简单又强大的语音录放模块?看这里! 这款语音录放模块支持arduino、AT指令、板载按键和AD按键四种控制方式。通过板载按键即使在没有微控制器的情况下也能进行录放音。 模块支持多段语音录制,并且模块搭载了16MB的存储空间,可以录制大约40分钟的声音。通过USB线您可以很容易的将模块中的录音拷贝到电脑上。

Product Image

产品链接 (https://www.dfrobot.com.cn/goods-2992.html)

DFR0745: DF1101S语音录放模块

目录

概述

1.记录语音
2.播放语音

库安装

To use this library, first download the library file, paste it into the \Arduino\libraries directory, then open the examples folder and run the demo in the folder.

方法

  bool begin(Stream &s);
  
  /**
   * @fn setBaudRate
   * @brief 设置波特率(需断电重启,掉电保存)
   * @param 9600,19200,38400,57600,115200
   * @return true or false
   */
  bool setBaudRate(uint32_t baud);

  /**
   * @fn setPlayMode
   * @brief 设置播放模式
   * @param ePlayMode_t:SINGLECYCLE,ALLCYCLE,SINGLE
   * @return true or false
   */
  bool setPlayMode(ePlayMode_t mode);

  /**
   * @fn setLED
   * @brief 设置指示灯(掉电保存)
   * @param true or false
   * @return true or false
   */
  bool setLED(bool on);
  
  /**
   * @fn setPrompt
   * @brief 设置提示音(掉电保存)
   * @param true or false
   * @return true or false
   */
  bool setPrompt(bool on);
  
  /**
   * @fn setVol
   * @brief 设置音量
   * @param vol:0-30
   * @return true or false
  */
  bool setVol(uint8_t vol);
  
  /**
   * @fn switchFunction
   * @brief 设置工作模式
   * @param eFunction_t:MUSIC,RECORD,UFDISK
   * @return true or false
   */
  bool switchFunction(eFunction_t function);
  
  /**
   * @fn next
   * @brief 下一曲
   * @return true or false
   */
  bool next();
  
  /**
   * @fn last
   * @brief 上一曲
   * @return true or false
   */
  bool last();
  
  /**
   * @fn start
   * @brief 播放(在音乐模式下) or 录音(在录音模式下)
   * @return true or false
   */
  bool start();
  
  /**
   * @fn pause
   * @brief 暂停播放(在音乐模式下) or 暂停录音(在录音模式下)
   * @return true or false
   */
  bool pause();
  
  /**
   * @fn saveRec
   * @brief 保存录音
   * @return true or false
   */
  String saveRec();
  
  /**
   * @fn delCurFile
   * @brief 删除当前播放文件
   * @return true or false
   */
  bool delCurFile();
  
  /**
   * @fn playSpecFile
   * @brief 播放指定路径文件一次
   * @param 指定路径
   */
  void playSpecFile(String str);
  
  /**
   * @fn playSpecFile
   * @brief 播放指定编号文件一次(仅对默认文件名有效),如果没有则播放第一个文件
   * @param 文件名编号:0-999
   */
  void playSpecFile(int16_t num);

  /**
   * @fn getVol
   * @brief 获取音量
   * @return vol
   */
  uint8_t getVol();

  /**
   * @fn getPlayMode
   * @brief 获取播放模式
   * @return ePlayMode_t
   */
  ePlayMode_t getPlayMode();

兼容性

MCU Work Well Work Wrong Untested Remarks
Arduino Uno
Mega2560
Leonardo
ESP32
ESP8266
M0

历史

  • 2020/11/26 - Version 1.0.0 released.

创作者

Written by fengli(li.feng@dfrobot.com), 2020.11.26 (Welcome to our website)

Copyright 2010 DFRobot Co.Ltd Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

Wanna buy a simple & practical voice recorder? This one is right for you! The voice recorder module supports 4 controlling modes Arduino, AT command, on-board buttons and ADKEY, and multi-segment voice recording. You can directly press the on-board buttons to record or play voice without using a controller. Moreover, the 16MB storage on the modu... 展开 收起
C++
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C++
1
https://gitee.com/dfrobot/DFRobot_DF1101S.git
git@gitee.com:dfrobot/DFRobot_DF1101S.git
dfrobot
DFRobot_DF1101S
DFRobot_DF1101S
master

搜索帮助