Hi again, sorry for being a pain, hopefully this will be the last question for today.
I've got my file setup to take data from three .csv files. The strings are then converted to float values and used to drive things on the screen.
I'm currently using a for loop, which is just putting everything on screen at once, which isn't what I want. I want to increment one new value every second (there are 120 strings in my files).
Here's my code at the moment:
Code:float myValue;
void setup(){
size (1200, 1000);
frameRate(1);
}
void draw(){
String[] time = loadStrings("time.csv");
String[] heart = loadStrings("heart_rate.csv");
String[] speed = loadStrings("speed.csv");
for (int i = 0; i < 120; i++){
myValue = 10 *( Float.valueOf(speed[i]).floatValue());
line(i * 10, myValue * 10, myValue * 5, myValue * 5);
}
for (int a = 0; a < 120; a++){
myValue = 10 *( Float.valueOf(time[a]).floatValue());
ellipse(a * 10, myValue * 20, myValue * 5, myValue * 5);
}
}
What would I need to change to create one ellipse and one square per second?