Hi Guys,
I am quite new to Arduino programming and I have written a program that indicates via LED's when a temperature is either above, below on within a set-point temperature range. I am displaying the set-point temperature as "Target" and the real temperature from the sensor as "Actual" on a 16X2 LCD display.
The set-point can vary between 15 and 30 degrees centigrade via a potentiometer.
If the temp is <= set-point + 2 and temp is >= set-point - 2 a green LED will be on
If the temp is < set-point a blue LED will be on
If the temp is > set-point a red LED will be on
Only one LED will be on at any one time.
Now I have constructed this circuit and written the code using Tinkercad and it works with no problems, however I have compiled the program and uploaded it to my Arduino UNO and it does not seem to be working. I am not 100% sure if there are code differences between the two? The display is outputting the written text but the temperatures for "Target" and "Actual" are remaining on 0 (Zero) and not updating.
As I mentioned I am fairly new to programming so I am unsure how to further verify if my program is actually running or if it's stuck.
I have uploaded the Arduino .ino file and a .txt version for a more experienced programmer to have a look at and hopefully point out if I have made an error or advise how I could go about debugging to find the problem.
Regards
Dan
I am quite new to Arduino programming and I have written a program that indicates via LED's when a temperature is either above, below on within a set-point temperature range. I am displaying the set-point temperature as "Target" and the real temperature from the sensor as "Actual" on a 16X2 LCD display.
The set-point can vary between 15 and 30 degrees centigrade via a potentiometer.
If the temp is <= set-point + 2 and temp is >= set-point - 2 a green LED will be on
If the temp is < set-point a blue LED will be on
If the temp is > set-point a red LED will be on
Only one LED will be on at any one time.
Now I have constructed this circuit and written the code using Tinkercad and it works with no problems, however I have compiled the program and uploaded it to my Arduino UNO and it does not seem to be working. I am not 100% sure if there are code differences between the two? The display is outputting the written text but the temperatures for "Target" and "Actual" are remaining on 0 (Zero) and not updating.
As I mentioned I am fairly new to programming so I am unsure how to further verify if my program is actually running or if it's stuck.
I have uploaded the Arduino .ino file and a .txt version for a more experienced programmer to have a look at and hopefully point out if I have made an error or advise how I could go about debugging to find the problem.
Regards
Dan
Attachments
-
3.8 KB Views: 7