{"id":15866923,"url":"https://github.com/robertpeteuil/arduino-clock-example","last_synced_at":"2025-04-01T21:22:47.817Z","repository":{"id":130532158,"uuid":"84663478","full_name":"robertpeteuil/arduino-clock-example","owner":"robertpeteuil","description":"Arduino Clock Example Code - Demonstration Code for: I2C, Interrupts, external Header File, Compiler Defines, Compiler Conditionals","archived":false,"fork":false,"pushed_at":"2017-04-28T16:07:00.000Z","size":1111,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-07T13:56:06.753Z","etag":null,"topics":["7-segment","arduino","clock","conditional-statements","i2c","interrupt-pins","interrupts","rtc","trigger"],"latest_commit_sha":null,"homepage":"","language":"Arduino","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robertpeteuil.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-11T16:23:39.000Z","updated_at":"2019-06-14T14:36:05.000Z","dependencies_parsed_at":"2023-04-14T07:57:00.889Z","dependency_job_id":null,"html_url":"https://github.com/robertpeteuil/arduino-clock-example","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertpeteuil%2Farduino-clock-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertpeteuil%2Farduino-clock-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertpeteuil%2Farduino-clock-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertpeteuil%2Farduino-clock-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robertpeteuil","download_url":"https://codeload.github.com/robertpeteuil/arduino-clock-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246710477,"owners_count":20821410,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["7-segment","arduino","clock","conditional-statements","i2c","interrupt-pins","interrupts","rtc","trigger"],"created_at":"2024-10-05T23:40:32.602Z","updated_at":"2025-04-01T21:22:47.792Z","avatar_url":"https://github.com/robertpeteuil.png","language":"Arduino","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Arduino Clock Example Code\n### Demonstration Code for: I2C, Interrupts, external Header File, Preprocessor Commands: Defines and Conditional Compilation\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/f5e8c7e780fd463cb2cc1d09e2fe4358)](https://www.codacy.com/app/robertpeteuil/arduino-clock-example?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=robertpeteuil/arduino-clock-example\u0026amp;utm_campaign=Badge_Grade)\n[![GitHub issues](https://img.shields.io/github/issues/robertpeteuil/arduino-clock-example.svg)](https://github.com/robertpeteuil/arduino-clock-example)\n[![GitHub release](https://img.shields.io/github/release/robertpeteuil/arduino-clock-example.svg?colorB=2067b8)](https://github.com/robertpeteuil/arduino-clock-example)\n[![lang](https://img.shields.io/badge/language-C%2B%2B-f34b7d.svg?style=flat-square)](https://github.com/robertpeteuil/arduino-clock-example)\n[![lang](https://img.shields.io/badge/language-Arduino-bd79d1.svg?style=flat-square)](https://github.com/robertpeteuil/arduino-clock-example)\n[![license](https://img.shields.io/github/license/robertpeteuil/arduino-clock-example.svg?colorB=2067b8)](https://github.com/robertpeteuil/arduino-clock-example)\n\n---\n\nThe project is intended to server as a reference and example for:\n- Accessing a module via I2C\n- Using hardware interrupts and assigning functions for varying parameters\n- Read and debounce button presses via hardware interrupts    \n- Parsing a serial stream to get user data\n- Storing data in non-volatile memory via I2C\n- Including and using an External Header File\n- Using Compiler PreProcessor Commands - Defines, and Conditional Compilation\n\nTo maximize ease of re-use:\n- The code is broken into discrete functions.\n- The Functions are named by device: 7-Segment-Display, RTC, UART, and Menu.\n- The code is extensively commented to make it easy to re-purpose.  \n\n### Functionality\n\nThis project reads the current time from a RTC, displays it on a 7-Segment Display Module, allows external configuration of settings via buttons, and uses sound to provide user feedback.  \n\nDetails:\n- Set / Read current time from DS1307 module\n- Displays time on 7-Segment Display\n- Interrupt-driven realtime display of time\n- Outputs sound via small speaker\n- Use Hardware buttons to allow user settings changes  \n\n### FILES INCLUDED:\n\n**Source Code:**\n- 'SSclockInits.h' - program header, variable inits, defines and conditional compilation settings\n- 'SSclock.ino' - main program code \u0026 all functions\n\n**Datasheets:** - in the \"datasheets\" sub-folder\n- 'DS1307.pdf' - information on DS1307 real-time clock\n- 'SFE-0012-DS-7segmentSerial-v3.pdf' - ORIGINAL 7-Segment Display (Sparkfun# COM-09230)\n- 'SFE-0012-DS-7segmentSerial-v41.pdf' - NEW 7-Segment Display (Sparkfun# COM-09764)\n\n  *Sparkfun 7-Segment Module Versions:*\n  - Differ in the characters they can display, the commands they support, and brightness level\n  - So conditional complication is used to set variables/defines for the proper device version\n  - Make sure the appropriate device is #defined in the SSclockInits.h file (default is NEW version)\n\n**Photos** - in the \"photos\" sub-folder\n- 'photo-clock-labeled-internals.jpg' - photo of internal of clock implementation\n- 'photo-clock-outside-front.jpg' - front of clock implementation\n- 'photo-clock-outside-rear.jpg' - rear of clock implementation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertpeteuil%2Farduino-clock-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobertpeteuil%2Farduino-clock-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertpeteuil%2Farduino-clock-example/lists"}