Skip to content

Commit 1105bc4

Browse files
committed
Update docu for esp32 use
1 parent ffce086 commit 1105bc4

File tree

6 files changed

+35
-18
lines changed

6 files changed

+35
-18
lines changed

DFR0534.pdf

175 KB
Binary file not shown.

README.md

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
# DFR0534
2-
An Arduino Uno/Nano library for a [DFR0534](https://wiki.dfrobot.com/Voice_Module_SKU__DFR0534) audio module. The library works with SoftwareSerial and is very similar to https://github.com/sleemanj/JQ8400_Serial, but is no fork.
2+
An Arduino Uno/Nano, ESP32 library for a [DFR0534](https://wiki.dfrobot.com/Voice_Module_SKU__DFR0534) audio module. The library works with SoftwareSerial/ HardwareSerial and is very similar to https://github.com/sleemanj/JQ8400_Serial, but is no fork.
33

4-
To create a DFR0534 object pass the existing SoftwareSerial object as parameter to the DFR0534 constructor, for example
4+
[PDF-Documentation](DFR0534.pdf)
5+
6+
Examples, how to use the library
7+
- [playFileByName](/examples/playFileByName/playFileByName.ino)
8+
- [playFileByNumber](/examples/playFileByNumber/playFileByNumber.ino)
9+
- [playCombined](/examples/playCombined/playCombined.ino)
10+
11+
## SoftwareSerial for Arduino Uno/Nano
12+
To create a DFR0534 object pass the SoftwareSerial object as a parameter to the DFR0534 constructor, for example
513

614
```
715
#include <SoftwareSerial.h>
@@ -14,12 +22,22 @@ DFR0534 g_audio(g_serial);
1422
...
1523
```
1624

17-
[PDF-Documentation](DFR0534.pdf)
25+
## HardwareSerial for ESP32
26+
To create a DFR0534 object pass the HardwareSerial object as a parameter to the DFR0534 constructor, for example
1827

19-
Examples how to use the library
20-
- [playFileByName](/examples/playFileByName/playFileByName.ino)
21-
- [playFileByNumber](/examples/playFileByNumber/playFileByNumber.ino)
22-
- [playCombined](/examples/playCombined/playCombined.ino)
28+
```
29+
#include <DFR0534.h>
30+
31+
#define TX_PIN 19
32+
#define RX_PIN 23
33+
HardwareSerial g_serial(1);
34+
35+
DFR0534 g_audio(g_serial);
36+
37+
void setup() {
38+
g_serial.begin(9600, SERIAL_8N1, RX_PIN, TX_PIN);
39+
...
40+
```
2341

2442
## License and copyright
2543
This library is licensed under the terms of the 2-Clause BSD License [Copyright (c) 2024 codingABI](LICENSE.txt).
@@ -73,9 +91,10 @@ This library is licensed under the terms of the 2-Clause BSD License [Copyright
7391

7492
For function details see comments in [DFR0534.cpp](src/DFR0534.cpp)
7593

76-
7794
### DFR0534 pinout
78-
![DFR0534](assets/images/DFR0534.jpg)
95+
96+
![DFR0534 frontside](assets/images/DFR0534.jpg)
97+
![DFR0534 backside](assets/images/DFR0534_backside.jpg)
7998

8099
Minimal schematic to use this library
81100
| Pin | Connected to |
@@ -88,5 +107,3 @@ Minimal schematic to use this library
88107
| SP- | Speaker - connector |
89108

90109
*If your microcontroller runs at 5V use a 1k resistor between RX and SoftwareSerial TX.
91-
92-

assets/images/DFR0534_backside.jpg

173 KB
Loading

library.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name=DFR0534
2-
version=1.0.3
2+
version=1.0.4
33
author=codingABI
44
maintainer=codingABI
5-
sentence=Class for controlling a DFR0534 audio module by SoftwareSerial
5+
sentence=Class for controlling a DFR0534 audio module by SoftwareSerial or HardwareSerial
66
paragraph=Library supports the DFR0534 audio module (https://wiki.dfrobot.com/Voice_Module_SKU__DFR0534)
77
category=Device Control
88
url=https://github.com/codingABI/DFR0534
9-
architectures=avr
9+
architectures=avr,esp32

src/DFR0534.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
* @author codingABI https://github.com/codingABI/
3939
* @copyright 2-Clause BSD License
4040
* @file DFR0534.cpp
41-
* @version 1.0.3
41+
* @version 1.0.4
4242
*/
4343
#include "DFR0534.h"
4444

src/DFR0534.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Description:
55
* Class for controlling a DFR0534 audio module (https://wiki.dfrobot.com/Voice_Module_SKU__DFR0534)
6-
* by SoftwareSerial
6+
* by SoftwareSerial or HardwareSerial
77
*
88
* License: 2-Clause BSD License
99
* Copyright (c) 2024 codingABI
@@ -14,12 +14,12 @@
1414
* @author codingABI https://github.com/codingABI/
1515
* @copyright 2-Clause BSD License
1616
* @file DFR0534.h
17-
* @version 1.0.3
17+
* @version 1.0.4
1818
*/
1919
#pragma once
2020

2121
/** Library version */
22-
#define DFR0534_VERSION "1.0.3"
22+
#define DFR0534_VERSION "1.0.4"
2323

2424
#include <Arduino.h>
2525
#include <Stream.h>

0 commit comments

Comments
 (0)