5/3/2023 0 Comments Ds3231 bluetooth arduino![]() 'These global variables will be declared once when the application starts. All control of the SDA and SCL lines are hard coded making use of B4R core library only. The code below and attached is my interpretation of the DS3231 data sheet to write date and time values to the RTC - data sheet attached. Only setback at the moment is that I need to connect it back to pins A4 and A5 to read from it via the inline C code (i.e to see if writing date/time values to the DS3231 were correctly received by the DS3231. Have tested the settings making use of pins 10 and 11 and also 11 and 12 and it is working fine. It therefore does not solely rely on pins A4 and A5. In this project (setting date and time only - not yet reading) any two digital pins that are correctly assigned will allow you to set the Date/Time on the DS3231. On the Arduino Nano, the I2C but is tied to pins A4 and A5. ![]() The protocol is hard coded (i.e no library) and you can therefore use any 2 digital pins of an Arduino Uno/Nano/etc to connect to the SDA and SCL pins of the DS3231. The attached project implements the I2C communication protocol to set the Date and Time of a DS3231 RTC module.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |