With all of the necessary libraries installed, your CLUE should look like this.

  • adafruit_apds9960
  • adafruit_bmp280.mpy
  • adafruit_bus_device
  • adafruit_clue.mpy
  • adafruit_display_shapes
  • adafruit_display_text
  • adafruit_lis3mdl.mpy
  • adafruit_lsm6ds.mpy
  • adafruit_register
  • adafruit_sht31d.mpy
  • adafruit_slideshow.mpy
  • neopixel.mpy

Pose Bitmaps

You'll need to load some compatible bitmap files onto your CIRCUITPY drive. We've included a series of Yoga pose icons from that are Creative Commons licensed.

To use them, first download the .zip file linked below, and uncompress it. Create a directory on the CLUE's root level called icons. Then, copy a few pose .bmp files into the icons folder.

For information on how to create your own compatible bitmaps, check out the Customization section of the Notifcation Icons page in this guide.

Text Editor

Adafruit recommends using the Mu editor for editing your CircuitPython code. You can get more info in this guide.

Alternatively, you can use any text editor that saves files.


Copy the code from the code-block below and paste it into the Mu editor and save it to your CLUE as (or copy from the zip file and place on the CIRCUITPY drive).

# SPDX-FileCopyrightText: 2020 John Park for Adafruit Industries
# SPDX-License-Identifier: MIT

# Yoga pose timer
# Requires CLUE with solenoid transistor driver circuit

import time
import board
from digitalio import DigitalInOut, Direction
from adafruit_clue import clue
from adafruit_slideshow import SlideShow, PlayBackDirection

pose_time = 30  # choose the time to hold each pose in seconds

solenoid = DigitalInOut(board.D2)  # pad #2 on CLUE driving a MOSFET
solenoid.direction = Direction.OUTPUT
solenoid.value = False

def chime(repeat):
    for _ in range(repeat):
        solenoid.value = True
        solenoid.value = False

slideshow = SlideShow(clue.display, None, folder="/icons", auto_advance=False)

while True:
    if clue.proximity > 10:
        slideshow.direction = PlayBackDirection.FORWARD

    if clue.button_b:  # skip ahead
        slideshow.direction = PlayBackDirection.FORWARD

    if clue.button_a:  # skip back
        slideshow.direction = PlayBackDirection.BACKWARD

How to use the Yoga Pose Chime

  • Turn on both battery packs first, so the CLUE turns on and the solenoid can be triggered
  • You'll begin the first pose timer by waving your hand close to the CLUE's proximity sensor which is mounted right above the screen
  • The solenoid triggers once to chime the bowl, signaling the pose can begin
  • After 30 seconds (or your chosen interval time) the solenoid will chime twice, signaling the end of the pose
  • You can press the B button on the CLUE to skip ahead to a different pose, the A button to go back to a pose

This guide was first published on May 20, 2020. It was last updated on May 20, 2020.

This page (Code the Yoga Pose Chime in CircuitPython) was last updated on Nov 27, 2021.

Text editor powered by tinymce.