An alarm clock with environment stats in pure bare metal embedded rust
Clone or download
Latest commit 1f2ae16 Jan 28, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.cargo use e-paper Sep 19, 2018
cad battery holders Jan 28, 2019
images update images Nov 27, 2018
portable improve the cancel button behavior Dec 14, 2018
src switch to RTFM task for msg Dec 19, 2018
.gitignore semi-hosting-clock on rtfm Aug 16, 2018
.travis.yml travis on stable Dec 6, 2018
Cargo.lock switch to RTFM task for msg Dec 19, 2018
Cargo.toml switch to RTFM task for msg Dec 19, 2018
LICENSE semi-hosting-clock on rtfm Aug 16, 2018
README.md Update README.md Jan 18, 2019
openocd.gdb use e-paper Sep 19, 2018
openocd.sh semi-hosting-clock on rtfm Aug 16, 2018

README.md

Rusty clock Build status

An alarm clock with environment stats in pure bare metal embedded rust.

fromt back open

Description

This alarm clock is programed in bare metal rust (no OS). It features pressure, temperature, humidity, monophonic alarm on a e-paper display.

Hardware

The hardware used in this project is

You also need a ST-Link v2 to flash and debug.

Everything can be purchased on Aliexpress. Budget is around US $35 without the 3D printed case and soldering set.

Wiring

Everything is plugged directly to the blue pill board.

E-paper display to blue pill board:

  • BUSY -> A10
  • RST -> A9
  • DC -> A8
  • CS -> B12
  • CLK -> B13
  • DIN -> B15
  • GND -> G
  • VCC -> 3.3

BME280 to blue pill board:

  • VIN -> 3.3
  • GND -> G
  • SCL -> B6
  • SDA -> B7

Buttons are connected to the blue pill board between G and

  • A6 for cancel
  • A7 for previous
  • B0 for next
  • B1 for OK

Passive buzzer is connected to the blue pill board between G and A0.

Coin battery to blue pill board:

  • (-) -> G
  • (+) -> VB

Plug the micro USB connector of the blue pill board to a USB power supply (or a computer).

Compiling and flashing

For compiling and flashing, please refer to the blue pill quickstart.

Basically:

curl https://sh.rustup.rs -sSf | sh
rustup target add thumbv7m-none-eabi
sudo apt-get install gdb-arm-none-eabi openocd
cd rusty-clock
# connect ST-Link v2 to the blue pill and the computer
# ./openocd.sh in another terminal
cargo run --release