Error with Real Time DS 1302

Hi,
I want to connect a rtc ds 1302 to mkr wifi 1010 and I used a ds1302.h library. I traied for any pin but when I download a code, an error usb port occour.
I tried the same code to a arduino uno withaout problem, but I don't understand how to do with mkr wifi 1010, id it's a problem of library or about pin. Please can I help me ?
Thanks
Andrea

What code? Post the code here. Read the forum guidelines to see how to properly post code and some information on how to get the most from this forum.
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.

Please include the entire error message. It is easy to do. There is a button (lower right of the IDE window) called "copy error message". Copy the error and paste into a post in code tags. Paraphrasing the error message leaves out important information.

What library?

The DS3231 RTC is much more accurate and does not require an external crystal.

I have already a rtc ds1302 , so I wanted to connect it. The error message is aht disappear the port usb, don't possible to reconnect to arduino wothout press two time a reset button. The follow is the code, but not import it, it's general code

DS1302_Serial_Easy
// Copyright (C)2015 Rinky-Dink Electronics, Henning Karlsen. All right reserved
// web: http://www.RinkyDinkElectronics.com/
//
// A quick demo of how to use my DS1302-library to
// quickly send time and date information over a serial link
//
// I assume you know how to connect the DS1302.
// DS1302: CE pin -> Arduino Digital 2
// I/O pin -> Arduino Digital 3
// SCLK pin -> Arduino Digital 4

#include <DS1302.h>

// Init the DS1302
DS1302 rtc(2, 3, 4);

void setup()
{
// Set the clock to run-mode, and disable the write protection
rtc.halt(false);
rtc.writeProtect(false);

// Setup Serial connection
Serial.begin(9600);

// The following lines can be commented out to use the values already stored in the DS1302
rtc.setDOW(FRIDAY); // Set Day-of-Week to FRIDAY
rtc.setTime(12, 0, 0); // Set the time to 12:00:00 (24hr format)
rtc.setDate(6, 8, 2010); // Set the date to August 6th, 2010
}

void loop()
{
// Send Day-of-Week
Serial.print(rtc.getDOWStr());
Serial.print(" ");

// Send date
Serial.print(rtc.getDateStr());
Serial.print(" -- ");

// Send time
Serial.println(rtc.getTimeStr());

// Wait one second before repeating :slight_smile:
delay (1000);
}

Hi,
I also tried to update a firmware of mkr wifi 1010 but I have again the same error when I upload a code with ds1302.h , so after the upload I don't see anymore the usb port where it Was join arduino. I used a digital input 3,4,5. I repeat again, i tried the same ds1302 , code and librari with arduino uno without problem. I don't understand wich is a problem, if a library or others can I help me please?

Hi,
Can you tell me if I can use ds1302 arduino mkr wifi 1010 or I have to chance to ds1307 or others rtc with I2c bus? If it is possible can you tell me wich library and pin I have to use?
Thanks