opps, port A is only for i2c, Port B is for I/O
Sorry again for the typo that I didn't catch.
Sorry 2 I was playing with code and didn't realise both the adc and earth sensor was there as I was working on my book.
Sorry again for the confusion.
Glad to hear that the senor works.