Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
Diana Khalipina
Published © GPL3+

Anti-stress kit

Creation of a mini-station to get t° and light levels, stepcounter and deep-breathing counter to get info about body state and relax

BeginnerFull instructions provided1 hour1,135
Anti-stress kit

Things used in this project

Story

Read more

Schematics

Micro:bit with the battery

Code

Detailed code for the micro:bit

Python
from microbit import *
import utime

steps = 0

while True:
  if microphone.sound_level() > 200:
    display.scroll('1 2 3 4 5', delay=150, wait=True)
  if accelerometer.current_gesture() == 'shake' :
    utime.sleep(1)
    steps = steps + 1
  if button_b.is_pressed():
    display.show('T:')
    display.scroll(str(temperature()), delay=150, wait=True)
    display.show('L:')
    display.scroll(str(display.read_light_level()), delay=150, wait=True)
  if button_a.is_pressed():
    display.scroll(str(steps), delay=150, wait=True)

Credits

Diana Khalipina
23 projects • 97 followers
Integrating Web Accessibility in Healthcare Tech | Web Developer & Bioengineering Specialist in Paris | MSc in Biomedical Engineering
Contact

Comments

Please log in or sign up to comment.