docs: public float getHalfWave() throws IOException
      {
          while (true)
          {
              int sample = getSample();
              if (frequencyCounter.update(sample))
              {
                  return frequencyCounter.getFrequency();
              }
          }
      }