Skip to content

Qbicz/tranquil-sleep

Repository files navigation

Tranquil-sleep project

Exploration of a design of earphone and a dock, working together to allow user to fall into calm sleep.

This is a draft - decisions were made based on device availability (I only had ESP32 with me).

Further decisions will be made based on power consumption, form factor, scalability (device FLASH and RAM size), electronics design feasibility and price.

Design

Set up the build environment

Install esp-idf according to https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/get-started/index.html

To make the idf tools usable from the command line, some environment variables must be set. . ~/esp//export.sh

Build

idf.py build

Flash & monitor

idf.py -p flash monitor

To quit, press: Ctrl+]

Unit tests

Unit testing with Ceedling

The project leverages Throw the Switch's MadScienceLab Plugins Docker image, which contains Ceedling, Unity, CMock and a full build tool-chain pre-installed.

Execute the tests from the project root using the helper script:

./run-tests.sh

The script pulls the image if necessary and runs ceedling clobber test:all in the container using your UID/GID so files in build/ remain writable.

If you need different Ceedling tasks you can pass them as arguments, e.g.:

./run-tests.sh test:single[my_module]

The script maps the current directory into the container (-v $(pwd):/project) and removes the container when finished (--rm).

GitHub Actions CI Check

The GitHub Actions workflow configured for this repository will automatically check C/C++ code formatting on every push to a pull request. For automatic formatting, you can install pre-commit hook available in the repo.

About

Earphones to allow user to fall into calm sleep

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published