Day system/pop up system

I'm making a fitness tracker and I've encountered an issue. I want to implement a day system/pop-up system. For the day system, after a set amount of minutes (let's say 20) I want it to have a pop-up animation that sends them to the next day. However, the only way I can think of doing this is by using "wait 1200 seconds", then broadcasting the next day. Also another issue if i do this, the step tracker that is in my fitness tracker has data, and it will be wiped once the next day comes. I want to have a history where it shows the steps of the previous day. How can I combat this? Sorry for the lengthy question and I do appreciate any sort of answer :slight_smile:

I've thought to counter the history part by just before the 1200 seconds i do another command, wait 1998 seconds and set "data steps (v)" to steps. But not sure how I can implement this over a set amount of days or would I have to make "data steps 1" "data steps 2" so on and so forth for a lot of days.

Don't be sorry, lengthy questions are the best kind of questions.


Detecting the next day is actually pretty easy.

  1. Store the current day in a variable.
    Something like this can help (if you're using a custom day length, rather than the actual day, then just replace the (current []) blocks).
  2. Wait until the day is different from the stored day.
  3. Broadcast the next day.

This way doesn't rely upon a specific amount of time between days, it just checks if the dsy has chsnged.

If you want to store the data in the browser, so you can get it back, you can use the database library.

Hey this is great, actually helps with another thing. However, I wanted to make it so that it changes after a certain period of time, since this is a project my teacher would be checking out and waiting a whole day is something he wouldn't do haha. Thanks for the reply tho, do let me know if you have an alternative for this :slight_smile: Thank you once again

If it's a certain amount of time, then I guess a good method would indeed to just use a wait seconds block inside a forever loop.