code: func (h *ADXL345Driver) SetRate(rate byte) (err error) {
  	if rate <= ADXL345_RATE_3200HZ {
  		return errors.New("not a valid rate")
  	}
  	h.bwRate.rate = rate & 0x0F
  	if _, err := h.connection.Write([]byte{ADXL345_REG_BW_RATE, h.bwRate.toByte()}); err != nil {
  		return err
  	}
  	return
  }
docs: // SetRate change the current rate of the sensor