How do you make a stopwatch?


#1

I’ve tried to make a project that includes a stopwatch. Does anybody know how? I would very much appreciate it.:clap::slightly_smiling_face:


#2

What do you need help with specifically when making a stopwatch?


#3

I made one like a year ago


@Hi_people


#4

I’ll try and come up with the code. If see,you want the clock to increase seconds and when they reach sixty put them back to zero again,and minutes will be increased by one.when a stop button is tapped,the time stops. You are gonna need lots of variables


#5


This topic should help.


#6

I figured out how to make one;should I create a tutorial for it?(it’s not actually a stopwatch but you should probably see how it would work)


#7

Idk if this will help but I made one that counts secs


#8

What you need is three buttons:
Start, Stop and Reset.
Then, you could have a loop that increases the value “Time” by one every second if the value “On” equals 1. Set the value “On” to 1 when you tap the Start button. Set it to 0 every time the Stop button is pressed. Then, the reset button could just set the value “Time” to 0 and “On” to 0. Use a Repeat Forever and a Set text block with the value “Time” in it. If anything is confusing, just ask me!


#9

I know how to make the time go up. I just need help with the stopping part. I need it so it will still display the time. I can’t make the time stop going up. :confused:


#10

Can you post a link to your project and/or your code? I can hopefully help you.


#11

You can copy mine. I don’t care about that project really anymore


#12

You just need a variable that controls when the stopwatch should be running and an object that you tap that changes this variable.

Here’s some example code: