Added proper Arduino environment detection