|
1 | 1 | /**
|
2 |
| - * This sketch runs on Seeeduino devices. |
| 2 | + * This sketch runs on ESP32C3 devices. |
3 | 3 | * I2C OLED Display and buttons Example
|
4 | 4 | *
|
5 |
| - * ABOUT SEEEDUINO XIAO and EEPROM |
6 |
| - * The Seeeduino XIAO does no have internal EEPROM. |
7 |
| - * To provide a convenient way to store and retrieve the reciver useful data, this sketch uses a library emulated-EEPROM with flash memory |
8 |
| - * See FlashStorage_SAMD Arduino library on https://github.com/khoih-prog/FlashStorage_SAMD |
| 5 | + * This Sketch was designed to be compiled and installed on the ESP32C3 (Super Mini). |
| 6 | + * However, it can be easily adapted for another ESP32 model, as well as a different |
| 7 | + * family of microcontrollers. Refer to the following table. It can guide you in making |
| 8 | + * the connections between the Si48XX and the ESP32C3. |
9 | 9 | *
|
10 |
| -
|
| 10 | + * It is important to note that this project aimed at transforming receivers based on the Si4825 |
| 11 | + * (with an analog interface) into receivers with a digital interface using the Si4827. However, |
| 12 | + * You can easily adapt it to an standalone project. |
11 | 13 | *
|
12 |
| - * SEEEDUINO and SI4844 pin connections |
| 14 | + * ESP32C3 and SI4844 pin connections |
13 | 15 | *
|
14 |
| - * | SI4844 pin | SEEEDUINO pin | Description | |
| 16 | + * | SI4827 pin | ESP32C3 pin | Description | |
15 | 17 | * | --------- | ------------ | ------------------------------------------------- |
|
16 |
| - * | 2 | 2 | SEEEDUINO interrupt pin | |
17 |
| - * | 15 | 6 | RESET | |
18 |
| - * | 16 | A4 (SDA) | I2C bus (Data) | |
19 |
| - * | 17 | A5 (SCL) | I2C bus (Clock) | |
| 18 | + * | 1 | GPIO2 | ESP32C3 interrupt pin | |
| 19 | + * | 9 | GPIO3 | RESET | |
| 20 | + * | 10 | GPIO9 (SDA) | I2C bus (Data) | |
| 21 | + * | 11 | GPIO8 (SCL) | I2C bus (Clock) | |
20 | 22 | * | -----------| ------------- | ---------------------------------------------------|
|
21 | 23 | * | OLED | | |
|
22 | 24 | * | -----------| ------------- | ---------------------------------------------------|
|
23 |
| - * | SDA | A4 | It shares the I2C bus with the SI4844 | |
24 |
| - * | CLK | A5 | It shares the I2C bus with the SI4844 | |
| 25 | + * | SDA | GPIO9 (SDA) | It shares the I2C bus with the SI4827 | |
| 26 | + * | CLK | GPIO8 (SCL) | It shares the I2C bus with the SI4827 | |
25 | 27 | * | -----------| ------------- | ---------------------------------------------------|
|
26 | 28 | * |Push Buttons| | | |
|
27 | 29 | * | -----------| ------------- | ---------------------------------------------------|
|
|
45 | 47 | #include "DSEG7_Classic_Regular_21.h"
|
46 | 48 |
|
47 | 49 |
|
48 |
| - |
49 | 50 | // OLED Diaplay constants
|
50 | 51 | #define I2C_ADDRESS 0x3C
|
51 | 52 | #define RST_PIN -1 // Define proper RST_PIN if required.
|
52 | 53 |
|
53 |
| -// Arduino Pin (tested on pro mini) |
54 |
| -#define INTERRUPT_PIN 2 |
55 |
| -#define RESET_PIN 6 |
56 | 54 |
|
57 |
| -#define BAND_UP 7 // Next Band |
58 |
| -#define BAND_DOWN 8 // Previous Band |
59 |
| -#define VOL_UP 9 // Volume Volume Up |
| 55 | +#define INTERRUPT_PIN 2 // GPIO2 |
| 56 | +#define RESET_PIN 3 // GPIO3 |
| 57 | + |
| 58 | +#define BAND_UP 6 // GPIO6 - Next Band |
| 59 | +#define BAND_DOWN 5 // GPIO5 - Previous Band |
| 60 | +#define VOL_UP 7 // Volume Volume Up |
60 | 61 | #define VOL_DOWN 10 // Volume Down
|
61 | 62 |
|
62 | 63 | #define MIN_ELAPSED_TIME 100
|
|
0 commit comments