I had a friend write me some code which works perfectly on a MEGA32U4 PRO MICRO.but i now want to run it on a ATMEGA328P-AU TQFP-32
the code basically displays 4 temperature readings from four TMP36 Sensors
problem is temperature readings are incorrect, by about 2c
5v VCC is not 100% accurate 4.95v so any fluctuations in the voltage messes with temperature readings. i believe aref reference pin connected to vcc stops this issue. so maybe aref not working (code issue?)
i also have to connect vcc (5v) to A5 to stop the temperature reading going to -100
when i connect 5v to A5 i get a reading of 18c and real temperature reading should be 20c
so i believe i just need to fix the aref to 5v and fix the code.
unfortunately i am very new to writing code i have been trying myself but if im honest i dont know what im doing and my friend that originally write the code is away at the minute so was wondering if anyone on here would have a look at the code and hopefully something will stand out to a more experienced user on here.i would be more than happy to send some cash or parts? as a thank you for taking time to help me as i don't expect waste any free time on me. anyone interested i will PM the code to you. thanks from pete