arduino-makefile as module
add makefile, and ignore build artifacts
reorder function declarations, plus other fixes