Go Down

Topic: knowing how much CPU the Arduino use? (Read 552 times) previous topic - next topic

david1234

Hello ,
is there a way to know how much CPU the Arduino use?

so if I make a program run I will know if he is using 95% , and I will change something

Thanks ,

westfw

Not easily.  The idea of "how much cpu is my program using" depends on the idea that the cpu is doing something else when it's not running your program.   There *is* no something else on an arduino; your sketch is using ALL of the CPU ALL of the time.  What you want to know is "how much of the time is my sketch spending waiting for something to happen (pin change, delay expiration, serial data available, etc) instead of actually doing something.  And that's much harder to measure.

david1234


Go Up