5
Making Arduino Faster
This chapter is all about finding out how fast your Arduino is and squeezing it for that extra bit of horse-power when you need it.
How Fast Is an Arduino?
Before you start worrying about improving the speed of your sketches, let’s take a moment to benchmark your Arduino to see just how it compares with other computers, starting with the oft-quoted MHz and GHz.
An Arduino Uno is clocked at 16 MHz. As most instructions (adding or storing a value in a variable) are executed in a single clock cycle, that means the Uno can do 16 million things in one second. Sounds pretty good, doesn’t it? The story is not that simple, however, as the C that you write in a sketch expands into quite a few instructions.
Now contrast that with ...
Get Programming Arduino Next Steps: Going Further with Sketches, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.