code: def value(self):
          
          if self.pwm_device.pin.frequency is None:
              return None
          else:
              try:
                  return log2(
                      self.pwm_device.pin.frequency / self.mid_tone.frequency
                  ) / self.octaves
              except ZeroDivisionError:
                  return 0.0
docs: Represents the state of the buzzer as a value between -1 (representing
          the minimum tone) and 1 (representing the maximum tone). This can also
          be the special value :data:`None` indicating that the buzzer is
          currently silent.