draw() loop execution time and frameRate()
in
Programming Questions
•
3 years ago
I'm doing data acquisition with an Arduino and collecting the data (serial over USB) on the PC with a Processing 1.2.1 program. I am using a separate serialEvent() function to grab data into a buffer, which I guess is interrupt-driven(?).
Printing out the delta between millis() on each pass through draw(), it is usually 15 msec or 30 msec. Can I change that? Setting frameRate() doesn't seem to change anything.
UPDATE: I see that I can make it slower, by setting a lower number, for example with frameRate(5) I get about 200 msec per cycle as expected. So I guess this is a limitation of my computer speed (old Inspiron 9300 laptop).
Printing out the delta between millis() on each pass through draw(), it is usually 15 msec or 30 msec. Can I change that? Setting frameRate() doesn't seem to change anything.
UPDATE: I see that I can make it slower, by setting a lower number, for example with frameRate(5) I get about 200 msec per cycle as expected. So I guess this is a limitation of my computer speed (old Inspiron 9300 laptop).
1