Working Ph sensor code