Skip to content

Add RTC clock sample using seeed_xiao_expansion_board and SSD1306 display #87845

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Yongci
Copy link

@Yongci Yongci commented Mar 29, 2025

This PR adds a new sample application demonstrating how to use the Zephyr RTC API together with an SSD1306 OLED display to implement a simple real-time clock (RTC). The sample is designed to run on the xiao_ble board with the seeed_xiao_expansion_board shield.

Key features:

Initializes and sets current date/time using rtc driver.

Periodically reads time from RTC.

Displays updated time on an SSD1306 OLED using the character framebuffer (cfb) driver.

Runs without console output — output is only shown on the display.

Demo:
rtc_display_demo

Hardware requirements:

XIAO BLE board

Seeed XIAO Expansion Board with SSD1306 (I²C interface)

Tested on:

xiao_ble + seeed_xiao_expansion_board

Tags: rtc, display, cfb, ssd1306, samples

Copy link

Hello @Yongci, and thank you very much for your first pull request to the Zephyr project!
Our Continuous Integration pipeline will execute a series of checks on your Pull Request commit messages and code, and you are expected to address any failures by updating the PR. Please take a look at our commit message guidelines to find out how to format your commit messages, and at our contribution workflow to understand how to update your Pull Request. If you haven't already, please make sure to review the project's Contributor Expectations and update (by amending and force-pushing the commits) your pull request if necessary.
If you are stuck or need help please join us on Discord and ask your question there. Additionally, you can escalate the review when applicable. 😊

Copy link
Collaborator

@bjarki-andreasen bjarki-andreasen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fun sample :) it will need to be placed elsewhere though, there is no clock subsystem :) I will recommend placing it at samples/drivers/display_cfb

there are also quite a bit of formatting issues, check the guide here https://docs.zephyrproject.org/latest/contribute/style/index.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants