Git Product home page Git Product logo

pico-clock-green-rs's Introduction

Pico Clock Green

Rust port of the C code for the Waveshare Pico Clock Green product.

See the usage guide for clock operation.

Table of Contents

  1. Development requirements
  2. Installation of development dependencies
  3. Running
  4. Roadmap
  5. Contributing
  6. License

Development Requirements

  • The standard Rust tooling (cargo, rustup) which you can install from https://rustup.rs/

  • Rust nightly

  • Toolchain support for the cortex-m0+ processors in the rp2040 (thumbv6m-none-eabi)

  • flip-link - this allows you to detect stack-overflows on the first core, which is the only supported target for now.

  • probe-run

  • A CMSIS-DAP probe. (J-Link and other probes will not work with probe-run)

    You can use a second Pico as a CMSIS-DAP debug probe. Details on other supported debug probes can be found in debug_probes.md

Installation of development dependencies

rustup install nightly
rustup +nightly target add thumbv6m-none-eabi
cargo +nightly install flip-link
cargo +nightly install probe-run --locked

Running

For a debug build

cargo run

For a release build

cargo run --release

If you do not specify a DEFMT_LOG level, it will be set to debug. That means println!(""), info!("") and debug!("") statements will be printed. If you wish to override this, you can change it in .cargo/config.toml

[env]
DEFMT_LOG = "off"

You can also set this inline (on Linux/MacOS)

DEFMT_LOG=trace cargo run

or set the environment variable so that it applies to every cargo run call that follows:

Linux/MacOS/unix

export DEFMT_LOG=trace

Setting the DEFMT_LOG level for the current session
for bash

export DEFMT_LOG=trace

Windows

Windows users can only override DEFMT_LOG through config.toml or by setting the environment variable as a separate step before calling cargo run

  • cmd
set DEFMT_LOG=trace
  • powershell
$Env:DEFMT_LOG = trace
cargo run

Roadmap

NOTE: This software is under active development. As such, it is likely to remain volatile until a 1.0.0 release.

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

The steps are:

  1. Fork the Project by clicking the 'Fork' button at the top of the page.
  2. Create your Feature Branch (git checkout -b features/AmazingFeature)
  3. Make some changes to the code or documentation.
  4. Commit your Changes (git commit -m 'Add some AmazingFeature')
  5. Push to the Feature Branch (git push origin features/AmazingFeature)
  6. Create a new pull request
  7. An admin will review the Pull Request and discuss any changes that may be required.
  8. Once everyone is happy, the Pull Request can be merged by an admin, and your work is part of our project!

There are linting policies on the project. Please use cargo clippy before submitting a pull request and fix all warnings. The automated builds will fail if a warning is generated.

Code of Conduct

See the code of conduct.

License

The contents of this repository are dual-licensed under the MIT OR Apache 2.0 License. That means you can chose either the MIT licence or the Apache-2.0 licence when you re-use this code. See MIT or APACHE2.0 for more information on each specific licence.

Any submissions to this project (e.g. as Pull Requests) must be made available under these terms.

pico-clock-green-rs's People

Contributors

domneedham avatar

Stargazers

 avatar

Watchers

 avatar

pico-clock-green-rs's Issues

Add speaker

Add settings for:

  • Hourly ring (like on Waveshare implementation) with icon
  • Sound on pomodoro finish (toggle with button press when setting up timer)

Add temperature reporting

Add settings for:

  • Scrolling on an interval (take Waveshares interval for now) (and showing appropriate icon)
  • Setting Celsius or Fahrenheit (and showing appropriate icon)

Add stopwatch

Effectively the reverse pomodoro timer.

  • Show correct icon

For now set a ceiling of 60 mins, like the pomodoro timer.

Only reset time if modified

When jumping through settings, any save on hour/minute will reset the RTC to 0 seconds. This is not desired behaviour and only should be reset if the hour or minute has actually been changed by the user.

Add flash memory save

Save configuration at runtime to persist between restarts.

  • hourly ring
  • temp setting (C or F)
  • temp scrolling
  • 12/24hr setting

Show more details periodically

Temperature is shown every minute by scrolling, but I think change this to show the date and temperature every 5 minutes.

Add alarms

RTC can have 2 alarms so be able to implement those.

Make own app as doesn't fit into settings:

  • Allow user to select alarm 1 or alarm 2 like app switcher
  • Show day of week via icons and text in display after setting the time

Other notes:

  • Use Alarm On icon if alarms are set
  • Only ring alarms in clock app

Add auto light

Add different settings of auto light

  • show icon
  • configure via settings
  • possibly configure with button (on clock app)

Add blinking colon in clock mode

Looking at the firmware in the C version, the colon has been implemented to easily determine what quarter of the minute it is. I think this is great and so will add an option to support this too.

  • Add blinking colon in clock (toggle with double click bottom button?)
  • Blink top 0-15 seconds
  • Blink bottom 15-30 seconds
  • Blink alternate 30-45 seconds
  • Blink both 45-60 seconds

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.