Estou anexando e colando (para diferentes preferências) o sketch DS3231_Serial_Easy.
Ao compilá-lo aparece a mensagem "no matching function for call to
DS3231::DS3231(const uint8&, const uintt&)."
Há cerca de 2 meses compilava sem problemas mas agora não consigo.
Alguém pode me ajudar?
#include <DS3231.h>
// Init the DS3231 using the hardware interface
DS3231 rtc(SDA, SCL);//LINHA EM QUESTÃO
void setup()
{
// Setup Serial connection
Serial.begin(115200);
// Uncomment the next line if you are using an Arduino Leonardo
//while (!Serial) {}
// Initialize the rtc object
rtc.begin();
// The following lines can be uncommented to set the date and time
//rtc.setDOW(WEDNESDAY); // Set Day-of-Week to SUNDAY
//rtc.setTime(12, 0, 0); // Set the time to 12:00:00 (24hr format)
//rtc.setDate(1, 1, 2014); // Set the date to January 1st, 2014
}
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 :)
delay (1000);
}
Tags:
Pelo que entendi, era para você ter declarado os pinos SDA e SCL nessa linha, mas você manteve o nome, troca pelos números.
Qualquer coisa usa a biblioteca do Sodaq_DS3231
Obrigado Tiago;
Já havia tentado com os números dos pinos (4 e 5 para uno e 20 e 21 para o mega)
mas nada mudou.
Inclusive o uno e o mega 2560 tem os pinos SDA e SCL dedicados.
Tens outra idéia?
Obrigado.
Bem-vindo a
Laboratorio de Garagem (arduino, eletrônica, robotica, hacking)
© 2024 Criado por Marcelo Rodrigues. Ativado por