Skip to content

"Frequently" Asked Questions

Lance A. Endres edited this page Jun 28, 2021 · 1 revision

Introduction

Below are answers to some questions that people may have.

Why is this Library so Large?

In order to follow good coding practices, all the classes had to be derived from a common class. So for one, it would be a logistical nightmare to try to separate each button behavior into separate libraries.

A second reason that it is an objective of this library to have most developer's button needs met in one location. That way a developer does not have to go searching through the many Arduino libraries to find the functionality they need. It also ensures the commonality of the buttons. That way a developer does not have to wrestle with a myriad of interfaces that both makes things more difficult and makes for ugly software.

Doesn't a Large Library Affect Performance?

Most modern compilers only introduce used code into the final binary. This means that if you only use 1 button type, only that code should be in your binary. The performance should not be any different than if you only had a single class in the library. That's the theory anyway, to be honest, I don't know enough about the Arduino compiler to know this is true for certain.