The “Breathing Exercise Light” described here is a simple and relatively inexpensive pulsing light that may support you in your breathing execises and help you to keep a constant breathing rhythm. It could also be used e.g. as a soothing night light for children.
In the current stage, it is hardly more than a working prototype. But you may also see it as an inexpensive and simple to build example for “physical computing” with a Raspberry Pi, and it might be used as a educational project on the beginners level. It is based on the Firefly Light example by Pimoroni (see here). Similar to the Firefly Light it requires a Raspberry Pi (Zero), the Pimoroni Explorer pHAT (or HAT) and two IKEA SRDAL LED light chains. The later are connected to the two PMW/motor ports of the pHAT. Instead of using a jar, I have placed the LEDs in an IKEA picture frame. I have been trying to optimize the original firefly light python script a bit, implementing an optional sinus function for the brightness/ pulse width changes and have introduced two hold phases between the dimming phases. While modifying the parameters to find a light pattern that feels more comfortable, I found that the device can helpful to support a very clearly defined, regular breathing pattern. Thus, some of you may find this Breathing Light helpful for meditation or training purposes. As the Explorer pHAT has four digital and four analog inputs, it is very easy to regulate up to four different parameters using slide or turnable potentiometers, and to introduce start/restart/stop functions for the lights using push buttons. This will allow you to use the device and optimize the parameters to your needs without a monitor has to be attached to the Pi.
In addition the Explorer pHAT comes with four digital out-ports, which allow to add LEDs or buzzers, plus two 5V and two Ground ports. Please make sure you are using the correct resistors to reduce the voltage for the LEDs.
Pimoroni’s Explorer pHAT python library makes it extremely simple to control all these I/O ports.To run the device autonomously, one could use either a power pack, or the combination of a Pimoroni LiPo shim and a LiPo battery, as described for the “Firefly Light”.”