#include <LiquidCrystal.h>
int sensorValue1 = 1;
int sensorValue2 = 2;
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd1(12, 11, 5, 4, 3, 2);
LiquidCrystal lcd2(12, 10, 5, 4, 3, 2);
void setup()
{
pinMode(A1, INPUT);
// set up the LCD1's number of columns and rows:
lcd1.begin(16, 2);
Serial.begin(9600);
pinMode(A2, INPUT);
// set up the LCD2's number of columns and rows:
lcd2.begin(16, 2);
Serial.begin(9600);
}
void loop()
{
// read the input on analog pin 1:
sensorValue1 = analogRead(A1);
// set the cursor to column 0, line 0:
lcd1.setCursor(4, 2);
// print out the value at LCD1 Display:
lcd1.print(sensorValue1);
lcd1.setCursor(10, 2);
lcd1.print("GHz");
// print out the value at Serial Monitor:
Serial.println(sensorValue1);
delay(1000);
lcd1.clear();
// read the input on analog pin 2:
sensorValue2 = analogRead(A2);
// set the cursor to column 0, line 0:
lcd2.setCursor(4, 2);
// print out the value at LCD2 Display:
lcd2.print(sensorValue2);
lcd2.setCursor(10, 2);
lcd2.print("GHz");
// print out the value at Serial Monitor:
Serial.println(sensorValue2);
delay(1000);
lcd2.clear();
}
#include <LiquidCrystal.h>
int sensorValue1 = 1;
int sensorValue2 = 2;
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd1(12, 11, 5, 4, 3, 2);
LiquidCrystal lcd2(12, 10, 5, 4, 3, 2);
void setup() {
pinMode(A1, INPUT);
// set up the LCD1's number of columns and rows:
lcd1.begin(16, 2);
Serial.begin(9600);
pinMode(A2, INPUT);
// set up the LCD2's number of columns and rows:
lcd2.begin(16, 2);
Serial.begin(9600);
}
void loop() {
// read the input on analog pin 1:
sensorValue1 = analogRead(A1);
// set the cursor to column 0, line 0:
lcd1.setCursor(4, 2);
// print out the value at LCD1 Display:
lcd1.print(sensorValue1);
lcd1.setCursor(10, 2);
lcd1.print("GHz");
// print out the value at Serial Monitor:
Serial.println(sensorValue1);
delay(1000);
lcd1.clear();
// read the input on analog pin 2:
sensorValue2 = analogRead(A2);
// set the cursor to column 0, line 0:
lcd2.setCursor(4, 2);
// print out the value at LCD2 Display:
lcd2.print(sensorValue2);
lcd2.setCursor(10, 2);
lcd2.print("GHz");
// print out the value at Serial Monitor:
Serial.println(sensorValue2);
delay(1000);
lcd2.clear();
}