I also tried using A4 and A5 instead of SDA and SCL pins. The error occurs in the third line (rtc (SDA,SCL)) - I have checked the pins and switched the battery on the chip. Rtc.setDate(1, 1, 2014) // Set the date to January 1st, 2014 Rtc.setDOW(WEDNESDAY) // Set Day-of-Week to SUNDAY If you have a datasheet or sample code that uses 8-bit address, you’ll want to drop the low bit (i.e. The Wire library uses 7 bit addresses throughout. 7 bits identify the device, and the eighth bit determines if it’s being written to or read from. I found a simple code online to test the chip but when I upload it the following error shows up: "no matching function for call to 'DS3231::DS3231(const uint8_t&, const uint8_t&)" #include Note: There are both 7 and 8-bit versions of I2C addresses. Multiple libraries (Rinky-Dink, ds3231-master) but nothing works. I found online a lot of library issues, i tried using A uint16t is an unsigned 16 bit value, so it takes 2 bytes (16/8 2) The only fuzzy one is int. uint8t is rather useless, because due to other requirements in the standard, it exists if and only if unsigned char is 8-bit, in which case you could just use unsigned char. So a uint8t is an unsigned 8 bit value, so it takes 1 byte. Im currently stuck with the DS3231 (zs-042) chip. In other words, this is an unsigned integer with 8 bits (minimum) or what we used to call, in the mists of C history, an 'unsigned char'. I am building a arduino based bicycle speedometer with time and temperature display.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |