Last active
October 29, 2015 19:00
-
-
Save AngeloStavrow/cb416941104a13a2bbb0 to your computer and use it in GitHub Desktop.
Handy Arduino snippets. Obviously.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get the number of elements in an array. | |
// From Arduino FAQ: | |
// http://arduino.land/FAQ/content/6/29/en/how-to-get-the-size-of-an-array.html | |
#define elementsInArray(x) (sizeof(x) / sizeof(*x)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment