Hi! thanks for replying!!
for what i need i think i would need to replace the
(frameCount % 30 == 0)
(every 30 frames it requests a new data if i understood well?? so in your code, the counter updates +1 every 30 frames, right?) with a function that could fetch data from an external source.
I tried to input your code in mine and it is working except the counter goes up very rapidly, like +50 at a time.
Here’s what i changed (selectedEvents is the array that is supposed to allow me to fetch the data from airtable i think)
void draw(){
if (selectedEvents.size() > 0) {
thread("requestData");
}
text("incoming data= "+data+" Count: "+count, 100,300);
}
void requestData() {
//Parcourir les enregistrements
if(millis() - start_time > selectedEvents.size()) {
count++;
start_time = millis();
data = "Xx";
}
}
i don’t know if this has anything to do with it but would you mind explaining what the start_time is needed for?
btw i’m really sorry if this seems very convoluted and all im very new to processing and this is for a school project so the teacher did most of the coding and now i’m trying to figure some stuff out without having him do all the code ^^’