GithubHelp home page GithubHelp logo

arduino-libraries / audiofrequencymeter Goto Github PK

View Code? Open in Web Editor NEW
45.0 22.0 22.0 62 KB

Allows the Arduino Zero and MKR1000 to sample a generic input audio signal and get the fundamental pitch

C++ 100.00%

audiofrequencymeter's Introduction

AudioFrequencyMeter Library for Arduino

Check Arduino status Compile Examples status Spell Check status

Allows the Arduino Zero and MKR1000 to sample a generic input audio signal and get the fundamental pitch.

License

Copyright (c) Arduino LLC. All right reserved.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Methods

  • begin(uint32_t ulPin, uint32_t sampleRate) : initialize the ADC to sample ulPin at the chosen sample rate. This process works in interrupt using TC5 to start the sampling process. ADC resolution is set to 8 bit

  • end() : stops the sampling process disabling both the ADC and TC5 and resetting TC5

  • setClippingPin(int pin) : put pin in output to be used as a clipping indicator

  • checkClipping : checks if there is a clipping event (converted value equals to the top or the bottom of the ADC dynamic) and drives HIGH the clippingPin

  • setAmplitudeThreshold(uint8_t threshold) : sets the threshold for which a detected frequency is considered right or wrong. Default is 30

  • setTimerTolerance(int tolerance) : sets the tolerance for which a sampled signal is considered valid. Default is 10

  • setSlopeTolerance(int tolerance) : sets the tolerance for which the slope is valid for the trigger process. Default is 3

  • setBandwidth(float minFrequency, float maxFrequency) : set the range of frequencies for which the detected frequency is valid. Default values for now are 60 Hz - 1500 Hz. This must be improved

  • getFrequency : return the value of the detected frequency if it is above the threshold defined by setAmplitudeThreshold, else -1

audiofrequencymeter's People

Contributors

aentinger avatar agdl avatar dependabot[bot] avatar karlsoderby avatar per1234 avatar sandeepmistry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

audiofrequencymeter's Issues

AudioFrequencyMeter

The attached sketch is a copy of the example published in the Arduino documentation as an implementation of a 'Simple Audio Frequency Meter' at:
https://www.arduino.cc/en/Tutorial/SimpleAudioFrequencyMeter with the addition of an analogRead.
Adding code to read from any analog input pin causes the USB connection to the board to disconnect following a successful compilation (see attached screen-grab). The sketch can not be executed. The implementation of AudioFrequencyMeter appears be incompatible with the script referencing any other analog pin. If this is the case, then I consider this to be a serious bug. The test script can not be developed to include other measurements, e.g. input volume or setting tempo using ADC. Furthermore, the code should provide for a ‘soft landing’, not a USB disconnect, requiring a ‘double-click’ hardware reset. I have tested with an MKRZERO under OS X 10, OS X 12 and Windows.

AFMglitch2.txt

afmglitch1

Arduino Uno Compatibility

Is there any way to make this compatible for the Arduino Uno? I'm pretty new to Arduino programming so maybe this is a dumb question, but if you could enlighten me anyway that would be great! Thank you

schematic available?

Hello, I was looking at the library and I would like to know if there is any reference on how to connect the microphone or related schematic.

Greetings!

Begin Function stuck

Trying to run the frequency meter with begin(A0, 960000) with frequency meter version 1.0.2 and board support version 1.6.6. The sketch does not run past the begin function but will start running the rest if the integer is lowered down, say to 900000.

Get Code not working in Arduino.cc reference link of AudioFrequencyMeter

The "get code" button on bottom right of code on leads to PAGE NOT FOUND-
https://www.arduino.cc/en/Tutorial/SimpleAudioFrequencyMeter

Is this a right place to open these issues? I know the commit capabilities to those pages is not available here but since this is the base directory for code-base of AudioFrequencyMeter library rising it here notifies respective authors. Correct me if this is a wrong place.
Also, if this needs a fix, I am willing to take up the charge and do the necessities.

Arduino/Genuino Uno.

Arduino: 1.8.8 (Windows 10), Board: "Arduino/Genuino Uno"

WARNING: library Audio claims to run on (sam) architecture(s) and may be incompatible with your current board which runs on (avr) architecture(s).
In file included from C:\Users\engab\Documents\Arduino\sketch_jan24a\sketch_jan24a.ino:11:0:

C:\Program Files (x86)\Arduino\libraries\Bridge\src/YunClient.h:24:2: warning: #warning "The use of YunClient is deprecated. Use BridgeClient instead!" [-Wcpp]

#warning "The use of YunClient is deprecated. Use BridgeClient instead!"

^

In file included from C:\Users\engab\Documents\Arduino\sketch_jan24a\sketch_jan24a.ino:12:0:

C:\Program Files (x86)\Arduino\libraries\Bridge\src/YunServer.h:24:2: warning: #warning "The use of YunServer is deprecated. Use BridgeServer instead!" [-Wcpp]

#warning "The use of YunServer is deprecated. Use BridgeServer instead!"

^

In file included from C:\Users\engab\Documents\Arduino\libraries\Audio\src/Audio.h:16:0,

             from C:\Users\engab\Documents\Arduino\sketch_jan24a\sketch_jan24a.ino:14:

C:\Users\engab\Documents\Arduino\libraries\Audio\src/DAC.h:21:16: error: expected ')' before '*' token

DACClass(Dacc *_dac, uint32_t _dacId, IRQn_Type _isrId) :

            ^

C:\Users\engab\Documents\Arduino\libraries\Audio\src/DAC.h:35:2: error: 'Dacc' does not name a type

Dacc *dac;

^

C:\Users\engab\Documents\Arduino\libraries\Audio\src/DAC.h:37:2: error: 'IRQn_Type' does not name a type

IRQn_Type isrId;

^

C:\Users\engab\Documents\Arduino\libraries\Audio\src/DAC.h: In member function 'void DACClass::enableInterrupts()':

C:\Users\engab\Documents\Arduino\libraries\Audio\src/DAC.h:31:44: error: 'isrId' was not declared in this scope

void enableInterrupts() { NVIC_EnableIRQ(isrId); };

                                        ^

C:\Users\engab\Documents\Arduino\libraries\Audio\src/DAC.h:31:49: error: 'NVIC_EnableIRQ' was not declared in this scope

void enableInterrupts() { NVIC_EnableIRQ(isrId); };

                                             ^

C:\Users\engab\Documents\Arduino\libraries\Audio\src/DAC.h: In member function 'void DACClass::disableInterrupts()':

C:\Users\engab\Documents\Arduino\libraries\Audio\src/DAC.h:32:45: error: 'isrId' was not declared in this scope

void disableInterrupts() { NVIC_DisableIRQ(isrId); };

                                         ^

C:\Users\engab\Documents\Arduino\libraries\Audio\src/DAC.h:32:50: error: 'NVIC_DisableIRQ' was not declared in this scope

void disableInterrupts() { NVIC_DisableIRQ(isrId); };

                                              ^

exit status 1
Error compiling for board Arduino/Genuino Uno.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Ambiguous output on Serial monitor

I am trying to run the example code on a Neutrino board ( SAMD21G18A, ARM M0+).
The input is a sine wave generated by AudaCity software at 440Hz.
The serial monitor only displays -1.00 Hz.
Any idea what's going on here?

the example does not work Arduino ide 1.8.13

Arduino: 1.8.13 (Windows Store 1.8.42.0) (Windows 10), Board: "Arduino Uno"

The sketch name had to be modified.
Sketch names must start with a letter or number, followed by letters,
numbers, dashes, dots and underscores. Maximum length is 63 characters.

WARNING: library AudioFrequencyMeter claims to run on samd architecture(s) and may be incompatible with your current board which runs on avr architecture(s).

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp: In member function 'void AudioFrequencyMeter::ADCconfigure()':

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:163:6: error: base operand of '->' is not a pointer

ADC->CTRLB.bit.RESSEL = ADC_CTRLB_RESSEL_8BIT_Val;

  ^~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:163:27: error: 'ADC_CTRLB_RESSEL_8BIT_Val' was not declared in this scope

ADC->CTRLB.bit.RESSEL = ADC_CTRLB_RESSEL_8BIT_Val;

                       ^~~~~~~~~~~~~~~~~~~~~~~~~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:167:6: error: base operand of '->' is not a pointer

ADC->CTRLB.bit.PRESCALER = ADC_CTRLB_PRESCALER_DIV8_Val; // Divide Clock by 8 -> ~100kHz

  ^~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:167:30: error: 'ADC_CTRLB_PRESCALER_DIV8_Val' was not declared in this scope

ADC->CTRLB.bit.PRESCALER = ADC_CTRLB_PRESCALER_DIV8_Val; // Divide Clock by 8 -> ~100kHz

                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:175:6: error: base operand of '->' is not a pointer

ADC->SAMPCTRL.reg = 0x1F; // Set max Sampling Time Length

  ^~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp: In function 'bool ADCisSyncing()':

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:184:14: error: base operand of '->' is not a pointer

return (ADC->STATUS.bit.SYNCBUSY);

          ^~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp: In member function 'void AudioFrequencyMeter::ADCdisable()':

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:189:6: error: base operand of '->' is not a pointer

ADC->CTRLA.bit.ENABLE = 0x00; // Disable ADC

  ^~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp: In member function 'void AudioFrequencyMeter::ADCenable()':

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:196:6: error: base operand of '->' is not a pointer

ADC->CTRLA.bit.ENABLE = 0x01; // Enable ADC

  ^~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp: In member function 'void AudioFrequencyMeter::ADCsetMux()':

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:208:28: error: 'g_APinDescription' was not declared in this scope

pinPeripheral(samplePin, g_APinDescription[samplePin].ulPinType);

                        ^~~~~~~~~~~~~~~~~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:208:3: error: 'pinPeripheral' was not declared in this scope

pinPeripheral(samplePin, g_APinDescription[samplePin].ulPinType);

^~~~~~~~~~~~~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:212:6: error: base operand of '->' is not a pointer

ADC->INPUTCTRL.bit.MUXPOS = g_APinDescription[samplePin].ulADCChannelNumber; // Selection for the positive ADC input

  ^~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp: In member function 'void AudioFrequencyMeter::tcConfigure()':

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:218:3: error: 'GCLK' was not declared in this scope

GCLK->CLKCTRL.reg = (uint16_t) (GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_ID(GCM_TC4_TC5)) ;

^~~~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:218:3: note: suggested alternative: 'SCL'

GCLK->CLKCTRL.reg = (uint16_t) (GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_ID(GCM_TC4_TC5)) ;

^~~~

SCL

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:218:35: error: 'GCLK_CLKCTRL_CLKEN' was not declared in this scope

GCLK->CLKCTRL.reg = (uint16_t) (GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_ID(GCM_TC4_TC5)) ;

                               ^~~~~~~~~~~~~~~~~~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:218:56: error: 'GCLK_CLKCTRL_GEN_GCLK0' was not declared in this scope

GCLK->CLKCTRL.reg = (uint16_t) (GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_ID(GCM_TC4_TC5)) ;

                                                    ^~~~~~~~~~~~~~~~~~~~~~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:218:97: error: 'GCM_TC4_TC5' was not declared in this scope

GCLK->CLKCTRL.reg = (uint16_t) (GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_ID(GCM_TC4_TC5)) ;

                                                                                             ^~~~~~~~~~~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:218:81: error: 'GCLK_CLKCTRL_ID' was not declared in this scope

GCLK->CLKCTRL.reg = (uint16_t) (GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK0 | GCLK_CLKCTRL_ID(GCM_TC4_TC5)) ;

                                                                             ^~~~~~~~~~~~~~~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:224:3: error: 'TC5' was not declared in this scope

TC5->COUNT16.CTRLA.reg |= TC_CTRLA_MODE_COUNT16;

^~~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:224:3: note: suggested alternative: 'PC5'

TC5->COUNT16.CTRLA.reg |= TC_CTRLA_MODE_COUNT16;

^~~

PC5

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:224:29: error: 'TC_CTRLA_MODE_COUNT16' was not declared in this scope

TC5->COUNT16.CTRLA.reg |= TC_CTRLA_MODE_COUNT16;

                         ^~~~~~~~~~~~~~~~~~~~~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:227:29: error: 'TC_CTRLA_WAVEGEN_MFRQ' was not declared in this scope

TC5->COUNT16.CTRLA.reg |= TC_CTRLA_WAVEGEN_MFRQ;

                         ^~~~~~~~~~~~~~~~~~~~~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:229:29: error: 'TC_CTRLA_PRESCALER_DIV1' was not declared in this scope

TC5->COUNT16.CTRLA.reg |= TC_CTRLA_PRESCALER_DIV1 | TC_CTRLA_ENABLE;

                         ^~~~~~~~~~~~~~~~~~~~~~~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:229:55: error: 'TC_CTRLA_ENABLE' was not declared in this scope

TC5->COUNT16.CTRLA.reg |= TC_CTRLA_PRESCALER_DIV1 | TC_CTRLA_ENABLE;

                                                   ^~~~~~~~~~~~~~~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:231:40: error: 'SystemCoreClock' was not declared in this scope

TC5->COUNT16.CC[0].reg = (uint16_t) (SystemCoreClock / sampleRate - 1);

                                    ^~~~~~~~~~~~~~~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:238:19: error: 'TC5_IRQn' was not declared in this scope

NVIC_DisableIRQ(TC5_IRQn);

               ^~~~~~~~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:238:3: error: 'NVIC_DisableIRQ' was not declared in this scope

NVIC_DisableIRQ(TC5_IRQn);

^~~~~~~~~~~~~~~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:239:3: error: 'NVIC_ClearPendingIRQ' was not declared in this scope

NVIC_ClearPendingIRQ(TC5_IRQn);

^~~~~~~~~~~~~~~~~~~~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:240:3: error: 'NVIC_SetPriority' was not declared in this scope

NVIC_SetPriority(TC5_IRQn, 0x00);

^~~~~~~~~~~~~~~~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:241:3: error: 'NVIC_EnableIRQ' was not declared in this scope

NVIC_EnableIRQ(TC5_IRQn);

^~~~~~~~~~~~~~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp: In member function 'bool AudioFrequencyMeter::tcIsSyncing()':

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:251:10: error: 'TC5' was not declared in this scope

return TC5->COUNT16.STATUS.reg & TC_STATUS_SYNCBUSY;

      ^~~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:251:10: note: suggested alternative: 'PC5'

return TC5->COUNT16.STATUS.reg & TC_STATUS_SYNCBUSY;

      ^~~

      PC5

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:251:36: error: 'TC_STATUS_SYNCBUSY' was not declared in this scope

return TC5->COUNT16.STATUS.reg & TC_STATUS_SYNCBUSY;

                                ^~~~~~~~~~~~~~~~~~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp: In member function 'void AudioFrequencyMeter::tcEnable()':

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:256:3: error: 'TC5' was not declared in this scope

TC5->COUNT16.CTRLA.reg |= TC_CTRLA_ENABLE;

^~~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:256:3: note: suggested alternative: 'PC5'

TC5->COUNT16.CTRLA.reg |= TC_CTRLA_ENABLE;

^~~

PC5

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:256:29: error: 'TC_CTRLA_ENABLE' was not declared in this scope

TC5->COUNT16.CTRLA.reg |= TC_CTRLA_ENABLE;

                         ^~~~~~~~~~~~~~~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp: In member function 'void AudioFrequencyMeter::tcReset()':

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:263:3: error: 'TC5' was not declared in this scope

TC5->COUNT16.CTRLA.reg = TC_CTRLA_SWRST;

^~~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:263:3: note: suggested alternative: 'PC5'

TC5->COUNT16.CTRLA.reg = TC_CTRLA_SWRST;

^~~

PC5

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:263:28: error: 'TC_CTRLA_SWRST' was not declared in this scope

TC5->COUNT16.CTRLA.reg = TC_CTRLA_SWRST;

                        ^~~~~~~~~~~~~~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp: In member function 'void AudioFrequencyMeter::tcDisable()':

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:273:3: error: 'TC5' was not declared in this scope

TC5->COUNT16.CTRLA.reg &= ~TC_CTRLA_ENABLE;

^~~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:273:3: note: suggested alternative: 'PC5'

TC5->COUNT16.CTRLA.reg &= ~TC_CTRLA_ENABLE;

^~~

PC5

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:273:30: error: 'TC_CTRLA_ENABLE' was not declared in this scope

TC5->COUNT16.CTRLA.reg &= ~TC_CTRLA_ENABLE;

                          ^~~~~~~~~~~~~~~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp: In function 'uint8_t ADCread()':

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:285:6: error: base operand of '->' is not a pointer

ADC->SWTRIG.bit.START = 1;

  ^~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:287:14: error: base operand of '->' is not a pointer

while ( ADC->INTFLAG.bit.RESRDY == 0 ); // Waiting for conversion to complete

          ^~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:288:20: error: base operand of '->' is not a pointer

returnValue = ADC->RESULT.reg; // Store the value

                ^~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:293:6: error: base operand of '->' is not a pointer

ADC->SWTRIG.bit.START = 0;

  ^~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp: In function 'void TC5_Handler()':

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:376:3: error: 'TC5' was not declared in this scope

TC5->COUNT16.INTFLAG.bit.MC0 = 1; // Clear interrupt

^~~

C:\Users\Dell\Documents\Arduino\libraries\AudioFrequencyMeter\src\AudioFrequencyMeter.cpp:376:3: note: suggested alternative: 'PC5'

TC5->COUNT16.INTFLAG.bit.MC0 = 1; // Clear interrupt

^~~

PC5

exit status 1

Error compiling for board Arduino Uno.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.