Added loading of bays from xml

Added in loading of bays
Editted the gpio functions to mirror the I2C functions
TODO: edit the measurement function to read from the adc