const byte BuzzerPin = 11;
const byte PhotoPin = A5;
int Readings;
float Frequency;
void setup()
{
pinMode(BuzzerPin,OUTPUT);
pinMode(PhotoPin,INPUT);
Serial.begin(9600);
}
void loop()
{
Readings = analogRead(PhotoPin);
Frequency = (12970./1007.)*Readings-73.04;
tone(BuzzerPin,Frequency);
/*Serial.println(Readings);
Serial.println(Frequency);
Serial.println();
delay(500);*/
}