Sie sind auf Seite 1von 1

#include <LiquidCrystal.

h>

LiquidCrystal lcd(2, 3, 4, 5, 6, 7);

//boolean Transmit = false;


void setup() {
lcd.begin(16, 2); lcd.print(" WELCOME ");

Serial.begin(9600); // Set up serial port at the desired bits per second

// Initialize I/O PORTS


pinMode(13, OUTPUT); // LED
}

void loop() {
// Read data from the ad converter

while(1)
{
lcd.clear();
lcd.setCursor(0,0);

int sensorValue1 = analogRead(A0);


lcd.print("Ch1: Ch2: ");
int sensorValue2 = analogRead(A1);
//int sensorValue3 = analogRead(A2);
///int sensorValue4 = analogRead(A3);

lcd.setCursor(0,1);
lcd.print(sensorValue1);
lcd.setCursor(10,1);
lcd.print(sensorValue2);
delay(500);
Serial.print("E");
Serial.print(sensorValue1);
Serial.print(",");
Serial.print(sensorValue2);
Serial.println("");
}

Das könnte Ihnen auch gefallen