Fixed Arduino code and corrected serial methods