Arief Azzmi wrote: Sun Jun 14, 2020 5:35 am
...
This my first time using STM32 for my personal study. I need tutorials to make my own digital clock using Blue Pill, DS3231 RTC and I2C LCD. Is there any library that suitable for my project? I've searched for it, but it's not compatible. And i still don't know about the code, too.
...
Welcome to the forum.
With a 'blue pill' you have a choice of two directions:
Roger Clark's core and the
STM official core.
Some basic knowledge about Arduino:
- Libraries are mostly written for external devices: sensors by model or modules by name... so, you would be looking for a "DS3231" library compatible with the "STM32F103xx blue pill". As stated by AG123, the blue pill has a 32K watch crystal. I did a write-up of a clone board recently and posted a test sketch using that library:
here
and the library for use with Roger's core
is here.
Now, for a display.
- As stated above, libraries are generally written for external devices. You need a display and they come in two general protocols: SPI and I2C.
I have an example of using an OLED I2C display
here.
I have an example of using an ILI9341 SPI display
here.
For Roger's core, much information can be found in the old forum:
here.
For blue-pill and maple-mini STM32F103 projects,
I have a few here. Many are years old, so I cannot promise that the newest ArduinoIDE will compile them error-free, you may have to study the error message and do your own fixing. But, the examples would be fair for guidance on creating your own code from scratch, which is what I would suggest. For example, I have a
STM32F103 GPS clock design here.
Now, a little bit about the Official core that I gave the link to previously. That core is far more sophisticated than Roger's core as it is a commercial product with thousand of users, thus it is well supported and has evolved to be very complete. By contrast, Roger's core is an enhanced version of the LeafLab's core which is 10+ years old. LeafLab still maintains a static copy of their old support forum and
documentation here.
Good luck, I hope the links above will give you some motivation to take a bit of time and do some reading and then select a path forward for your clock project. You will learn so very much more by taking bits and pieces of what you need and then building your own project. If you get an error, everything is explained somewhere from a Google Search.
Ray