Fix sampling interval value resolution range handling
Cleanup logging
Fix pin modes
#ifdef => #if