FreqMeasure.h library issue

Hello all,

All of a sudden, I can't compile any sketch when I include the FreqMeasure.h library. I've been cruising along just fine using it for a couple weeks now, but today it's kaput. I tried moving the library folder to the trash, reinstalling,, updating the IDE itself (I went from 1.8.10 to 2.1.0. I even get the error if I add it to the default new sketch, as below:

#include <FreqMeasure.h>

void setup() {
  // put your setup code here, to run once:
}

void loop() {
  // put your main code here, to run repeatedly:
}

Here is the complete compiler error:

xIn file included from /Users/jeffboynton/Documents/Arduino/libraries/FreqMeasure/FreqMeasure.cpp:27:0:
/Users/jeffboynton/Documents/Arduino/libraries/FreqMeasure/util/FreqMeasureCapture.h:76:4: error: #error "Unknown chip, please edit me with timer+counter definitions"
   #error "Unknown chip, please edit me with timer+counter definitions"
    ^~~~~
/Users/jeffboynton/Documents/Arduino/libraries/FreqMeasure/FreqMeasure.cpp: In static member function 'static void FreqMeasureClass::begin()':
/Users/jeffboynton/Documents/Arduino/libraries/FreqMeasure/FreqMeasure.cpp:39:2: error: 'capture_init' was not declared in this scope
  capture_init();
  ^~~~~~~~~~~~
/Users/jeffboynton/Documents/Arduino/libraries/FreqMeasure/FreqMeasure.cpp:39:2: note: suggested alternative: 'capture_msw'
  capture_init();
  ^~~~~~~~~~~~
  capture_msw
/Users/jeffboynton/Documents/Arduino/libraries/FreqMeasure/FreqMeasure.cpp:44:2: error: 'capture_start' was not declared in this scope
  capture_start();
  ^~~~~~~~~~~~~
/Users/jeffboynton/Documents/Arduino/libraries/FreqMeasure/FreqMeasure.cpp:44:2: note: suggested alternative: 'capture_msw'
  capture_start();
  ^~~~~~~~~~~~~
  capture_msw
/Users/jeffboynton/Documents/Arduino/libraries/FreqMeasure/FreqMeasure.cpp: In static member function 'static void FreqMeasureClass::end()':
/Users/jeffboynton/Documents/Arduino/libraries/FreqMeasure/FreqMeasure.cpp:85:2: error: 'capture_shutdown' was not declared in this scope
  capture_shutdown();
  ^~~~~~~~~~~~~~~~
/Users/jeffboynton/Documents/Arduino/libraries/FreqMeasure/FreqMeasure.cpp:85:2: note: suggested alternative: 'capture_previous'
  capture_shutdown();
  ^~~~~~~~~~~~~~~~
  capture_previous
/Users/jeffboynton/Documents/Arduino/libraries/FreqMeasure/FreqMeasure.cpp: In function 'void TIMER_CAPTURE_VECTOR()':
/Users/jeffboynton/Documents/Arduino/libraries/FreqMeasure/FreqMeasure.cpp:102:16: error: 'capture_read' was not declared in this scope
  capture_lsw = capture_read();
                ^~~~~~~~~~~~
/Users/jeffboynton/Documents/Arduino/libraries/FreqMeasure/FreqMeasure.cpp:102:16: note: suggested alternative: 'capture_lsw'
  capture_lsw = capture_read();
                ^~~~~~~~~~~~
                capture_lsw
/Users/jeffboynton/Documents/Arduino/libraries/FreqMeasure/FreqMeasure.cpp:108:6: error: 'capture_overflow' was not declared in this scope
  if (capture_overflow() && capture_lsw < 0xFF00) {
      ^~~~~~~~~~~~~~~~
/Users/jeffboynton/Documents/Arduino/libraries/FreqMeasure/FreqMeasure.cpp:108:6: note: suggested alternative: 'capture_lsw'
  if (capture_overflow() && capture_lsw < 0xFF00) {
      ^~~~~~~~~~~~~~~~
      capture_lsw
/Users/jeffboynton/Documents/Arduino/libraries/FreqMeasure/FreqMeasure.cpp:109:3: error: 'capture_overflow_reset' was not declared in this scope
   capture_overflow_reset();
   ^~~~~~~~~~~~~~~~~~~~~~
/Users/jeffboynton/Documents/Arduino/libraries/FreqMeasure/FreqMeasure.cpp:109:3: note: suggested alternative: 'capture_previous'
   capture_overflow_reset();
   ^~~~~~~~~~~~~~~~~~~~~~
   capture_previous

exit status 1

Compilation error: exit status 1

Any input is welcomed!
Jeff

What board are you using?

That error triggers if it isn't in the list of chips that the library is written for:

I'm using an Atmega328 U that I got from Jameco (it was supposed to be PU) on a breadboard, using an UNO with "Arduino as ISP" as the programmer. To get the Atmega328 U to work at all, I had to install MidiCore to be able to select an Atmega328 that I could run the bootloader on. I switched to Arduino UNO and it worked, so you are correct. I'll be returning those. Thank you for your reply!

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.