Functionalized hydrogel surface patterned in a chip for local pH sensing