File tree Expand file tree Collapse file tree 5 files changed +91
-3
lines changed
examples/examples-custom-boards/lyrat-mini Expand file tree Collapse file tree 5 files changed +91
-3
lines changed Original file line number Diff line number Diff line change
1
+ /* *
2
+ * @file buttons.ino
3
+ * @author Phil Schatzmann
4
+ * @brief Demo how to use the buttons.
5
+ * @version 0.1
6
+ * @date 2024-11-03
7
+ *
8
+ * The button values are determined with an analogRead().
9
+ * This demo shows how to use the integrated AudioActions class via the AudioBoardStream
10
+ *
11
+ * @copyright Copyright (c) 2022
12
+ */
13
+
1
14
2
15
#include " AudioTools.h"
3
16
#include " AudioTools/AudioLibs/AudioBoardStream.h"
Original file line number Diff line number Diff line change 1
1
2
2
/* *
3
+ * @file output.ino
4
+ * @author Phil Schatzmann
5
+ * @brief Demo how to use the microphone.
6
+ * @version 0.1
7
+ * @date 2024-11-03
8
+ *
3
9
* The microphone seems to be attached to 2 different i2s ports. In addition to the
4
10
* ES8311, the ES7243 is also started.
5
11
* The I2S pins can be selected via cfg.i2s_function: CODEC uses the ES8311 I2S pins
6
12
* and CODEC_ADC uses the ES7243 I2S pins; By default the CODEC value is used.
7
13
*
8
14
* Only CODEC_ADC will give a proper microphone input!
15
+ *
16
+ * @copyright Copyright (c) 2022
9
17
*/
10
18
19
+
11
20
#include " AudioTools.h"
12
21
#include " AudioTools/AudioLibs/AudioBoardStream.h"
13
22
Original file line number Diff line number Diff line change 1
- // Demo to output audio on a lyrat-mini board: with headphone detection active
2
- // to switch the power amplifier on and off
1
+ /* *
2
+ * @file output.ino
3
+ * @author Phil Schatzmann
4
+ * @brief Demo to output audio on a lyrat-mini board: with headphone detection
5
+ * active to switch the power amplifier on and off.
6
+ * I2S is used and the ES8311 is initialized via the driver library.
7
+ * @version 0.1
8
+ * @date 2024-11-03
9
+ *
10
+ * @copyright Copyright (c) 2022
11
+ */
3
12
4
13
#include " AudioTools.h"
5
14
#include " AudioTools/AudioLibs/AudioBoardStream.h"
Original file line number Diff line number Diff line change 1
1
2
- // The following should work: but unforunately it does not work for me!
2
+ /* *
3
+ * @file sd.ino
4
+ * @author Phil Schatzmann
5
+ * @brief Test/Demo that SD is not working!
6
+ * @version 0.1
7
+ * @date 2024-11-03
8
+ *
9
+ * @copyright Copyright (c) 2022
10
+ */
3
11
4
12
#include < SPI.h>
5
13
#include < SD.h>
Original file line number Diff line number Diff line change
1
+ /* *
2
+ * @file sdmmc.ino
3
+ * @author Phil Schatzmann
4
+ * @brief Test/Demo how to use the SD_MMC API in Arduino with the LyraT Mini
5
+ * @version 0.1
6
+ * @date 2024-11-03
7
+ *
8
+ * @copyright Copyright (c) 2022
9
+ */
10
+
11
+ #include " FS.h"
12
+ #include " SD_MMC.h"
13
+
14
+ // These pins are defined in the HAL
15
+ const int PIN_SD_CARD_POWER = 13 ;
16
+ const int PIN_SD_CARD_DET = 34 ;
17
+
18
+
19
+ // Arduino Setup
20
+ void setup (void ) {
21
+ Serial.begin (115200 );
22
+
23
+ // Mandatory: set power pin to low
24
+ pinMode (PIN_SD_CARD_POWER, OUTPUT);
25
+ digitalWrite (PIN_SD_CARD_POWER, LOW);
26
+
27
+ // Optionally: Determin if there is an SD card
28
+ pinMode (PIN_SD_CARD_DET, INPUT);
29
+ if (digitalRead (PIN_SD_CARD_DET)!=0 ){
30
+ Serial.println (" No SD Card detected" );
31
+ }
32
+
33
+ // open SDMMC in 1 bit mode
34
+ if (!SD_MMC.begin (" /sdcard" , true )) {
35
+ Serial.println (" Card Mount Failed" );
36
+ while (true );
37
+ }
38
+
39
+ auto file = SD_MMC.open (" /test.mp3" , FILE_READ);
40
+ if (!file){
41
+ Serial.println (" file open failed" );
42
+ while (true );
43
+ }
44
+
45
+ Serial.println (" Success" );
46
+ }
47
+
48
+ // Arduino loop - repeated processing
49
+ void loop () {}
You can’t perform that action at this time.
0 commit comments