CapacitiveSensor
CapacitiveSensor copied to clipboard
Removed Floating point math
I modified the portions of the code using float math. Rewriting it to use (unsigned) longs instead makes the resulting binary around 500 Bytes smaller. While this may not seem much on most Arduinos, it really does make a difference when compiling for things like e.g. a DigiSpark or directly for other ATtiny controllers.
Code was tested on Arduino Uno and Digispark. No problems found.