Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Handy Arduino snippets. Obviously.
// 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