Raspberry Pi alarm clock for childs, to let them know whether they can wake up or stay in bed

Miveil

Raspberry Pi alarm clock for childs, to let them know whether they can wake up or stay in bed.

The idea was to have a simple device that let my child know whether he can wake up or should stay in bed without a light always on, which is the case of all child alarm clock for sell. In action, it's pretty simple: a sonar listen for moves, when a move is detected, if the child should stay in bed, a (blue) led is turned on for 2 seconds, when he can wake up, another led (green) is turned on. Everyhting else is bonus (screen, animation).

Hardware

  • Raspberry Pi/Pi Zero W
  • Sonar:
    • HC-SR04
  • LEDs:
    • two leds with different colors or one rgb led
    • 220Ω resistor by led
  • Screen:
    • 0.96" oled screen SSD1306
    • 1kΩ resistor for the screen

Install OS

Use Raspberry Pi Imager to install the latest version of Raspbian Lite.

Before writing data on the SD card, press on SHIFT+CTRL+X to enter default options:

  • set the hostname
  • enable SSH
  • configure wifi (remember that some Pi such as Zero does not support 5Ghz wifi)

Setup and start

miveil runs on docker. After your OS fresh install, tun the following script to install deps, configure the Pi and start the container. It will create a docker-compose.yaml file in home with the content of the sample given.

curl -s https://raw.githubusercontent.com/pierrecle/miveil/develop/setup.sh | bash -s

Development

On your Pi, install go:

sudo apt install golang

Then, edit files (with VSCode and Go add-on, everyhting is way easier) and run:

go run main.go

Todo

  • chore/move miveil.go somewhere else
  • feat/implement hcsr04 using periph.io
  • feat/clean up on quit (reset gpio etc)
  • feat/track when sonar is triggered
  • feat/handle RTC DS3231
  • feat/make RTC optional
  • feat/make screen optional
  • feat/remove hard coded values
    • times
    • pinning
    • sonar maximum distance
    • display duration
    • animation
  • feat/make different inputs configurable
  • doc/make a video
  • doc/draw pinning
  • doc/write technical documentation
  • hardware/make a PCB ⚠️ help needed
  • hardware/make a 3D printable basic case
  • chore/handle releases with workflow etc
  • chore/write update process when not using portainer
  • feat/display current time after animation when can wake up
  • feat/create an OSD to display basic information (hostname, ip, wifi, current time)
  • feat/add a physical buttons to handle OSD
  • feat/create an API to change values
  • feat/handle wake up (morning where child should wake up at a precise time, for school etc)
  • BONUS/handle HUE lights to wake up
  • BONUS/front-end app
  • BONUS/HASS module

Ressources

Similar Resources

Takes a list of poker hands for two players in STDIN and scores them

Poker Hand Sorter Takes a list of poker hands for two players in STDIN and scores them. Returns the number of hands won by each player. Prerequisites

Jan 16, 2022

This example implements a basic example of how to create your own modules, and how to call them from other modules

This example implements a basic example of how to create your own modules, and how to call them from other modules. In addition, an example of how to do unit tests is developed.

Feb 1, 2022

Exfiltrates join/part events from a dedicated Valheim log and transmits them to a Herald webhook.

Exfiltrates join/part events from a dedicated Valheim log and transmits them to a Herald webhook.

Feb 6, 2022

:runner:runs go generate recursively on a specified path or environment variable and can filter by regex

Package generate Package generate runs go generate recursively on a specified path or environment variable like $GOPATH and can filter by regex Why wo

Sep 27, 2022

A simple Cron library for go that can execute closures or functions at varying intervals, from once a second to once a year on a specific date and time. Primarily for web applications and long running daemons.

Cron.go This is a simple library to handle scheduled tasks. Tasks can be run in a minimum delay of once a second--for which Cron isn't actually design

Dec 17, 2022

A go backend you can use as a template

A go backend you can use as a template

Golang project template form Golang Sri Lanka

May 18, 2022

a leaderboard system that can run on any Internet enabled device.

hacktoberfest-leaderboard a leaderboard system that can run on any Internet enabled device. How it works The app updates the leaderboard on README.md

Nov 1, 2021

Demo on how an executable can respawn after an update

Auto respawn on update demo Demo on how an executable can respawn after an update How to build go build updatedemo.go How to run ./updatedemo Rebuil

Nov 2, 2021

GoDumpLsass is a simple tool that can dump lsass without to get caught by Windows Defender.

GoDumpLsass GoDumpLsass is a simple tool that can dump lsass without to get caught by Windows Defender. Releases https://github.com/Enelg52/GoDumpLsas

Nov 4, 2022
Related tags
Makes a VM, imaginative name, I know

mkvm Makes a virtual machine from a bunch of templates using cloud-init userdata to customize them. This is an experimental tool I made for testing th

Jan 7, 2023
The package manager for macOS you didn’t know you missed. Simple, functional, and fast.
The package manager for macOS you didn’t know you missed. Simple, functional, and fast.

Stew The package manager for macOS you didn’t know you missed. Built with simplicity, functionality, and most importantly, speed in mind. Installation

Mar 30, 2022
Names things like they're action movies from the mid 90s.

thing-namer Names things like they're action movies from the mid 90s. Installing You know the drill. go get github.com/Unquabain/thing-namer Building

Nov 6, 2021
Read RFID card data so Protospace directors can assign them to users!

RFID Reader Dependencies This application was developed with: go1.17.5 linux/amd64 xclip version 0.13 (if you're on Linux) Find go for your OS and arc

Dec 15, 2021
Let's Go is task sharing app implemented in golang.

Let's Go - A sample GO app Overview Let's Go is an HTTP server. It has various apis to play with. It is a small app that can group users of a company

Dec 13, 2021
An experimental vulkan 3d engine for linux (raspberry 4)

protomatter an experimental vulkan 3d engine for linux (raspberry 4).

Nov 14, 2021
Watchdog for the unreliable nut-driver on the Raspberry Pi

nut-watcher For some reason, nut-driver on the Raspberry Pi likes to break. Every few days it stalls out trying to talk to my UPS. nut-watcher is a si

Dec 6, 2021
Some plain Go/Golang i2c sensor bindings to Waveshare Sense HAT for raspberry pi

i2c some plain Go/Golang i2c sensor bindings to Waveshare Sense HAT for raspberry pi using https://periph.io Supported hardware: Raspberry Zero W 1 ht

Dec 31, 2021
A simple LCD controller package for raspberry pi liquid crystal I²C displays.

A simple LCD controller package for raspberry pi liquid crystal I²C displays.

Nov 1, 2022
Run The World. Command aggregator output. Define many services watch them in one place.

Run The World. Command aggregator output. Define many services watch them in one place.

Feb 2, 2022