Electrolyte-oxide-semiconductor structures as pH sensors based on resistive-switching characteristic