fixed arduino variant check
fixed compiling for SAM cpu