Changed AT328 to 3v3 logic