Pushing data and calculating them

Hello,

I’m trying to pick up coding again to make other projects work again.

But it didn’t take long to get stuck again :blush:

I have a piece of code that pull a post.length quota.
I would like to create a small piece of code that.

That divides that number by 9 minutes.
And then I want to send all the numbers divided over the 9 minutes in to osc messages.

    for (let i = 0; i < posts.length; i++) {
        let post = posts[i];

for example :

I get 80 = post[i] and that divide by 9 minutes (540 sec) or 540 / 80 = 6.75

I then want to send every 6.75 seconds an osc message?

How would that I approach this as a novice who definitly wants to learn!!
But also would like to finish his project. (And has lots more other then this code in this project :stuck_out_tongue: :D)

Any help is welcome. In the mean time I will focus on FCC learn platform.

I’m not entirely sure what you’re asking for, but I think this might be what you want to read up on:

Yes that about it. Only I see it asks for millis whereas I’m never sure what the outcome will be from the 540 / post.length = x .

And I’m not sure if it takes x in the what setinterval.