I’m setting up a project which includes the UNO, 16x2 LCD and two temperature sensors into pwm pins 6&7. the current programme only allows me to read one sensor at a time (I know this is a standard problem with UNOs), i need to know if there’s a way to have both sensors read one after another,possibly in a stream if necessary? I’m no good with the technical language and only really a beginner so if possible would someone be able to write it into the code. I’ve tried a few different ways but nothing seems to work.
temperature_control2.ino (792 Bytes)
I've tried a few different ways but nothing seems to work.
Please post what you tried and explain the problems encountered
Post the code here rather than attach it and use code tags when you do
See read this before posting a programming question
this was a few weeks ago and unfortunately I can't find the original comment. I've spent 2 hours already looking for it and the other method the post got removed. it involved using a "'," function and having the data read sequencially on one line of the LDC I presume. i just need a code that displays the two inputs in whichever way is possible without having to buy another arduino.
Assuming that the code you posted compiles, try this
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
#define TRANSFORMERINPUT 7
#define AMBIENTINPUT 6
int transTemp = TRANSFORMER.read(TRANSFORMERINPUT);
int ambTemp = AMBIENT.read(AMBIENTINPUT);
Serial.print("Transformer Temperature(C): ");
Serial.print("Ambient Temperature(C): ");
lcd.print("AirTemp (C): ");
It won’t compile for me because I don’t have a library named dht11 (lowercase). Are you sure that you do ?
yes I have the library, it still won't register the second sensor and its gone to minus figures?
Where did you get the library from ?