You must first complete Controlling Timer Settings Using Touchpad before viewing this Lesson

Finishing Touches to the Timer App

Introduction

We will now add some final elements to make the timer app feel more smooth.

Components Needed

  • Little Python Brain
  • A tablet/phone/laptop
Steps

1

Setting up the buzzer

Simply import the buzzer library and set it up. 

2

Adding an "and" condition

We then want to set a limit on the L1 button condition so that we don’t go below 0.

3

Adding a simple beep to the end of the timer

Finally, we want to let the Brain emit a beep when the timer is done to signify that time’s up. Simply add the a bz.playNote after the last block.

The Complete Code

Run the code!

Back to: Intermediate > Countdown Timer

CONTACT US

    Log in with your credentials

    or    

    Forgot your details?

    Create Account