Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: Converting analog input

  1. #1
    Junior Member
    Join Date
    Nov 2018

    Converting analog input

    Hi there

    to the point, Im looking for alternatives to convert magnitude(FreqVal[ ])array to dB [] array

    Im using a df robot audio spectrum analyzer
    1 sound sensor
    with arduino mrk 1000
    here is the code
    #include <AudioAnalyzer.h>
    //Version 1.3 for Spectrum analyzer
    //Please download the latest library from the Product page!
    Analyzer Audio = Analyzer(4,5,0);//Strobe pin ->4  RST pin ->5 Analog Pin ->0
    //Analyzer Audio = Analyzer();//Strobe->4 RST->5 Analog->0
    int FreqVal[7];//
    void setup()
      Serial.begin(57600);	//Init the baudrate
      Audio.Init();//Init module 
    void loop()
      Audio.ReadFreq(FreqVal);//return 7 value of 7 bands pass filiter 
                              //Frequency(Hz):63  160  400  1K  2.5K  6.25K  16K
                              //FreqVal[]:      0    1    2    3    4    5    6  
      for(int i=0;i<7;i++)            
        Serial.print(max((FreqVal[i]-100),0));//Transimit the DC value of the seven bands
        if(i<6)  Serial.print(",");
        else Serial.println();
    and here is the shematicsClick image for larger version. 

Name:	Screenshot_2018-11-14 Z DFRobot Products DFR0126 Audio Analyzer Connection Diagram(using sound s.png 
Views:	60 
Size:	116.9 KB 
ID:	15155

    any idea would be appreciated

  2. #2
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Colmar, France
    You have seen that this is a support forum for Teensy MCU boards, libraries and accessories, manufactured by PJRC?
    I can't see any Teensy/PJRC stuff neither in your hardware nor in your software...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts