added sleep mode function to adafruit class