Add what is needed for pH sensor and make code neater