Code: Select all
DS1302 rtc(GPIO_NUM_2,GPIO_NUM_12,GPIO_NUM_15);
Code: Select all
DS1302 rtc(GPIO_NUM_2,GPIO_NUM_12,GPIO_NUM_15);
But if I use SD later, can it?pipi61 wrote: If you do not use the sd card, then this pins available
Code: Select all
#include <ErriezDS1302.h>
// Connect DS1302 data pin to Arduino DIGITAL pin
#if defined(ARDUINO_ARCH_AVR)
#define DS1302_CLK_PIN 2
#define DS1302_IO_PIN 3
#define DS1302_CE_PIN 4
#elif defined(ARDUINO_ARCH_ESP8266)
#define DS1302_CLK_PIN D4
#define DS1302_IO_PIN D3
#define DS1302_CE_PIN D2
#elif defined(ARDUINO_ARCH_ESP32)
#define DS1302_CLK_PIN 0
#define DS1302_IO_PIN 4
#define DS1302_CE_PIN 5
#else
#error #error "May work, but not tested on this target"
#endif
// Create DS1302 RTC object
DS1302 rtc = DS1302(DS1302_CLK_PIN, DS1302_IO_PIN, DS1302_CE_PIN);
Code: Select all
DS1302RTC RTC(14, 13, 16); // CLK, IO, CE
Code: Select all
#include <DS1302.h>
DS1302 rtc(16,12,14); // rst, dat, clk
void setup() {
Serial.begin(115200);
}
void loop() {
Serial.println(rtc.getTimeStr());
Serial.println(rtc.getDateStr());
delay(1000);
}
Code: Select all
Guru Meditation Error: Core00,len:6352
entry 0x400806b8
f001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:9720
ho 0 tail 12 room 4
load:0x40080400,len:6352
entry 0x400806b8
Guru Meditation Error: Core 1 panic'ed (LoadStoreError). Exception was unhandled.
Core 1 register dump:
PC : 0x400d0f38 PS : 0x00060330 A0 : 0x800d0d21 A1 : 0x3ffb1f50
A2 : 0x3f400f05 A3 : 0x00000002 A4 : 0x00000009 A5 : 0x00000003
A6 : 0x00000001 A7 : 0x00000000 A8 : 0x00000032 A9 : 0x0000001b
A10 : 0x3ffb1f5c A11 : 0x3ffb1f6e A12 : 0x00000009 A13 : 0x3ffb1f64
A14 : 0x000000ff A15 : 0x0875eb55 SAR : 0x00000010 EXCCAUSE: 0x00000003
EXCVADDR: 0x3f400f05 LBEG : 0x4000c349 LEND : 0x4000c36b LCOUNT : 0xffffffff
Backtrace: 0x400d0f38:0x3ffb1f50 0x400d0d1e:0x3ffb1f90 0x400d1b35:0x3ffb1fb0 0x4008a53d:0x3ffb1fd0
Rebooting...
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:9720
ho 0 tail 12 room 4
load:0x40080400,len:6352
entry 0x400806b8
Guru Meditation Error: Core 1 panic'ed (LoadStoreError). Exception was unhandled.
Core 1 register dump:
PC : 0x400d0f38 PS : 0x00060330 A0 : 0x800d0d21 A1 : 0x3ffb1f50
A2 : 0x3f400f05 A3 : 0x00000002 A4 : 0x00000009 A5 : 0x00000003
A6 : 0x00000001 A7 : 0x00000000 A8 : 0x00000032 A9 : 0x0000001b
A10 : 0x3ffb1f5c A11 : 0x3ffb1f6e A12 : 0x00000009 A13 : 0x3ffb1f64
A14 : 0x000000ff A15 : 0x0875eb55 SAR : 0x00000010 EXCCAUSE: 0x00000003
EXCVADDR: 0x3f400f05 LBEG : 0x4000c349 LEND : 0x4000c36b LCOUNT : 0xffffffff
Backtrace: 0x400d0f38:0x3ffb1f50 0x400d0d1e:0x3ffb1f90 0x400d1b35:0x3ffb1fb0 0x4008a53d:0x3ffb1fd0
Rebooting...
ets Jun 8 2016 00:22:57/code]
Hi,Chuma87 wrote: ↑Wed Feb 05, 2020 2:43 pmExtra fact:
I use the GPIO_13 pin (wake up) to receive a frequency sent to me by the CDM324 sensor, then analyze it, and after that, take a photo and save it in the SD, which also uses GPIO_13. All this works.
But when using the DS1302, it does not work, and the 5 pins are connected, including VCC & GND (DS1302) to POUT 3.3 / 5v & GND (ESP32-cam)
hello, i really hope someone could help me with these too. it is difficult for me to find the way to connect esp32 cam with RTC..Chuma87 wrote: ↑Sun Jan 26, 2020 6:41 pmHello partners. I would like to know if an RTC module DS1302 can be connected to esp32cam. GPIO13 already in use, what other pins can I use for CLK, DAT and RST?it doesn't let me use GPIO4 because FLAsh is already using itCode: Select all
DS1302 rtc(GPIO_NUM_2,GPIO_NUM_12,GPIO_NUM_15);
Users browsing this forum: No registered users and 67 guests