Very simple frequency program that assigns a frequency to a note

Dependencies:   mbed

main.cpp

Committer:
taptoneesarm
Date:
2015-11-30
Revision:
0:76182452ce7f

File content as of revision 0:76182452ce7f:

// The mBed interprets an alternating
// current as a result of detected frequency
// from the pickup/piezo from a played chord[input]

// The mBed then devises an output as 
// a pattern of LED lights to indicate
// the given chord [output]

#include "mbed.h"
#include <cstdio>
#include <cstdlib>
#include <iostream>
DigitalOut myled(LED1);

int main(int nNumberofArgs, char* pszArgs[]) {
    int freq;
    string actualFreq;
    cout << "Enter a frequency in kilohertz" << endl;
    cin >> freq;
    if (-0.5<(16.35 - freq)<0.5);
    {
       actualFreq = "C0";
    }
    cout << "Your chord is " << actualFreq;
    cout << "Press Enter to continue" << endl;
    return.0;
}