Drink Reminder

Overview

Its a well known fact that people of all ages should regularly drink water. This keeps hydration levels up and improves concentration in the workplace and classroom. 

In this lesson students will design and code a drinks reminder. They will learn how to program an external vibration motor to work in conjunction with the micro:bit LED matrix.

Aims

  • Learn how a vibration motor works.
  • Create a system that helps people for everyday life in the workplace and classroom.

Download the Code

MakeCode Editor

Click the button below to download the MakeCode editor code for this lesson. The hex file is contained in a zip folder.

Kindly refer to our download the code page for instructions on how to upload your code onto the micro:bit. Please use instructions set A.

This code can also be uploaded into the MakeCode editor.

Kit Required

Micro:bit

Innovation Board

Vibration Motor

  • Connector Cable

Preparation

  1. Connect the micro:bit to the Innovation board via the edge connector.
  2. Use the connector cables to connect the vibration motor to the ADC1 connector on the Innovation board.
  3. Connect the micro:bit to a computer via the microUSB cable.
  4. Go to the MakeCode website on your computer and open a new project.

Time to Code

What Will Happen

When the micro:bit is powered the vibration motor will vibrate for 1 second and then stop for 1 second. At the same time as the vibration the LED matrix will light up for the same period of time and will turn when the vibration motor turns off. This will repeat 4 times.

After the 4 repetitions the micro:bit will begin a countdown of 30 minutes. After 30 minutes the code will restart and the vibration motor and LED matrix will again vibrate and light up 4 times.

This code is in a forever loop so will continue whilst the micro:bit is powered.

Taking it Further

  • Add other components to the drink reminder system.
  • Create a timer setting so the time in between each reminder can be varied.

Keep in touch

We would love to keep you up to date with all of our latest news, offers and new products.

If you would like to subscribe to our mailing list please click the button below.

Contact Us

ScienceScope Limited
Downside School
Stratton-on-the-Fosse
Radstock
BA3 4RJ
enquiries@sciencescope.uk

Follow Us

#digitaleducationjourney