Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
FrequencyFinder.h
00001 #pragma once 00002 #include "mbed.h" 00003 #include "FFT.h" 00004 00005 #include "NewTextLCD.h" 00006 00007 using namespace std; 00008 00009 const int size=4096; 00010 00011 class FrequencyFinder{ 00012 public: 00013 00014 FrequencyFinder(PinName input); 00015 ~FrequencyFinder(); 00016 00017 float find_frequency(); 00018 void get_data(); 00019 void take_abs(); 00020 int find_peak(); 00021 int find_max(int); 00022 void initialize_array(); 00023 void copy_data(); 00024 00025 private: 00026 float signal_array[size]; 00027 int index; 00028 int peak; 00029 int frequency_final; 00030 00031 Ticker ticker; 00032 AnalogIn _signal_in; 00033 AnalogOut _dc_offset; 00034 00035 };
Generated on Thu Jul 14 2022 08:04:20 by
1.7.2