#How to Code a 10 Minute Timer

10 min timer

By following this #How to guide, you will obtain a "10 minute timer" that is portable, adjustable, and can be placed anywhere.

10 Minute Timer Materials Needed:
1. CyberPi Go Kit (or mBot2)
2. Computer/Smartphone/Tablet with our mBlock software installed

10 min timer

CyberPi is an educational single-board computer that integrates various sensors and features, enabling programming and creative practices. You can use the display and buttons on CyberPi and the programming capability of CyberPi to code a 10 minute timer.

Let's start!

10-minute timer

Download "mBlock" and connect CyberPi to your computer via a USB cable (or connect it to your phone or tablet via Bluetooth).

# Introduction #

# 10 Minute Timer Introduction #

10 Minute Timer Function Design Idea:
1. Press button A to start the countdown.
2. Reset the 10 min timer, like setting a new starting point for the countdown.
3. CyberPi repeatedly displays the time code (the time should be in integers) until the time reaches zero (the timer counts down from a set duration).
4. CyberPi emits a sound when the time is up.
5. The time code loops back to the initial state before you press button A.

mBot Neo with Coding Project Box: Easier, Faster, and More Fun Coding Learning10 min timer10 min timer10 min timer

10 Minute Timer Function Design Idea:
Building upon the existing setup, add an "if-then" function to display the corresponding lighting effects with the LEDs on CyberPi at specific intervals of the remaining time.

10 min timer

# Make A Note #

# Make A Note #

How to code and set a 10 minute timer?

Part I: Design a Countdown Function
--CyberPi repeatedly displays the time code until the 10 minute timer reaches zero.

Part II: Add LEDs to display the remaining time
--Building upon the existing setup, add an "if-then" function to display the corresponding lighting effects with the LEDs on CyberPi at specific intervals of the remaining time.

Part III: Display the countdown in minutes and seconds on your 10 min timer
--Minutes: remaining time divided by 60
--Seconds: remainder of the remaining time divided by 60

# Bring Me Home ^_^ #

# Bring Me Home ^_^ #

mBot2.jpg__PID:9c2f00ca-353a-4b87-bba8-997bd6ef2d4e

Makeblock CyberPi: Educational Electronics Kits for Beginners to Learn Programming

$59.99
$69.99
CyberPi.jpg__PID:c465656e-9b81-4181-b1ff-f9101f3b15ae

Makeblock CyberPi: Educational Electronics Kits for Beginners to Learn Programming

$59.99
$69.99