Added reading when xbee sleep and fixed pin number (not tested)