# ARDUINO UNO FREQEUNCY CONTROL VIA TEMP READINS

Hi I'm working on a project and am wanting to use an Arduino uno that requires frequency modulation by means of reading temp settings and changing the frequency to suit and also be able to manipulate through reading analogue potentiometer if possible..

Would basically look something like this ..

0c==4465hz
1c==4484hz
2c==4504hz
3c==4524hz
4c==4544hz
5c==4565hz
6c==4586hz
7c==4607hz
8c==4628hz
9c==4649hz
10c==4671hz
11c==4692hz

Etc. you get the picture I think, Not sure weather it's possible to achieve such a task the range would have to go further obviously down as low -20c and as high as +55c I have been looking all over the net but cant't find any reference to such a task..

Any help would be greatly appreciated... by many..

Bit about me.... I'm a mechanic by trade and am very new to the Arduino world but am keen to learn my son and I are working on this together and those of you with kids would understand what that means lol...

Do you have a formula for calculating the values in the table? They appear to be increasing by 0.45183402% per degree Centigrade. Unfortunately the Arduino 'float' type is only good for about 6 or 7 decimal places. Fortunately that only leads to an average error of 0.16 Hz.

You can use the pow() function to do float exponentiation on the Arduino:

``````float Degrees = getTemperature();  // can be 'float' or 'int'
int Frequency = 4465 + pow(1.0045183402, Degrees);
Tone(Frequency);
``````