Code Monkey home page Code Monkey logo

alarmclock's Introduction

AlarmClock

An Arduino-compatible alarm clock with multiple configurable alarms

Hardware design files are available in a separate repository: AlarmClock-hardware

Front side of AlarmClock in a wooden enclosure Back side of AlarmClock in a wooden enclosure

Features

  • configurable number (default 6, max 16) of configurable alarms
  • snooze feature with configurable time and count
  • a different ringing tone when snooze cannot be used (last ringing)
  • an LED that slowly lights up before the alarm sounds (ambient)
  • 2 separate buttons (snooze and stop). Stop can be installed further away from the bed, so that the user cannot reach it while still laying.
  • a 16x2 character LCD with a rotary encoder for configuration (GUI)
    Example LCD content for alarm configuration
  • an easy to parse serial port (UART) text-based configuration interface (CLI)
  • a Python library and MQTT adapter for easy control from a PC and automation (device needs to be connected to a server / PC via UART)
    Ambient LED control within Home Assistant
  • a web-based configuration interface (runs on PC, requires the MQTT adapter to be set up)
    Web configuration of AlarmClock

Building

Use PlatformIO to build the firmware. It will handle the dependencies automatically.

Upload to an Arduino UNO development board via UART:

# update libraries
make update

# compile
make

# upload via UART
make upload

Upload to the AlarmClock-hardware board using USBasp:

# update libraries
make update

# compile
make ENVIRONMENT=atmega328p

# burn fuses and bootloader
make bootloader ENVIRONMENT=atmega328p

# upload using USBasp ICSP programmer
make upload ENVIRONMENT=atmega328p

For more information, type make help.

Building with Arduino IDE should be possible, but you might need to create a few symlinks. I use PlatformIO exclusively for my testing, so Arduino IDE should be considered unsupported.

Testing

Static code analysis is performed on the computer used for development using cppcheck.

Native unit tests run natively on the computer used for development.

Not everything can be tested that way, so additional tests were written that need to run on the target microcontroller (embedded device). A new firmware is uploaded to the device and test results are received through UART.

# run static code analysis:
make check

# run native tests:
make test

# run tests on embedded device:
make test_embedded

Documentation

See the manual.

You can generate documentation for the source code using doxygen. Just type make docs.

I also published comprehensive documentation of the development process, but it is only available in Czech.

alarmclock's People

Contributors

ondras12345 avatar

Stargazers

 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.