GithubHelp home page GithubHelp logo

digitalclock's Introduction

DigitalClock

工科创Ⅱ-A大作业,2023-6-10

串口通信协议

?

在串口返回指令帮助

init clock

将时钟重置到 2000-1-1-00:00:00,不更改闹钟和计时器

get time

在串口返回当前时间,格式:$Time:\ hh:mm:ss$

get date

在串口返回当前日期,格式:$Date:\ yyyy-mm-dd$

get alarm

在串口返回设置的闹钟时间及状态

set time <hh:mm:ss>

设置时钟时间,并在串口返回设置成功与否,可用时间格式

$hh:mm:ss,\ hh-mm-ss,\ hh/mm/ss$

set date <yyyy:mm:dd>

设置时钟日期,并在串口返回设置成功与否,可用日期格式

$yyyy-mm-dd,\ yyyy:mm:dd,\ yyyy/mm/dd$

set time <hh:mm:ss>

设置闹钟时间,并在串口返回设置成功与否,可用时间格式

$hh:mm:ss,\ hh-mm-ss,\ hh/mm/ss$

run time

数码管切换到时钟时间显示模式

run date

数码管切换到时钟日期显示模式

run cdown

数码管切换到计时器显示模式,并开始倒计时

enable alarm

开启闹钟

disable alarm

关闭闹钟

enable cdown

开启倒计时

disable cdown

暂停倒计时

ps:

若指令输入错误、不完整或是数值不合法,串口会返回相应的报错和提示信息

digitalclock's People

Contributors

izthy-03 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.