#include <LiquidCrystal.h>
LiquidCrystal lcd (12,11,5,4,3,2); // RS, E, D4, D5, D6, D7
// int x = 2 + 1; // simple one time opertation
int addition;
int subtraction;
int multiplication;
int division;
void setup() {
// YouTube Circuit Basic - How to Set Up an LCD Display on the Arduino - Ultimate Guide to the Arduino #30
// YouTube Circuit Basic - How to Do Math in Arduino Programs - Ultimate Guide to the Arduino #10
// put your setup code here, to run once:
lcd.begin(16, 2);
lcd.setCursor(0, 0);
int a = 6;
int b = 3;
addition = a + b;
subtraction = a - b;
multiplication = a * b;
division = a / b;
lcd.print("Sum = "); // example code
// lcd.println(addition); // code for Arduino IDE
lcd.print(addition);
// lcd.print(" Difference = "); // example code
// lcd.println(subtraction);
lcd.print(subtraction); // code for Arduino IDE
// lcd.print("Product = "); // example code
// lcd.println(multiplication);
// lcd.print("Quotient = "); // example code
// lcd.println(division);
}
void loop() {
// put your main code here, to run repeatedly:
// lcd.setCursor(0, 0);
// lcd.print("Hello World! ");
// lcd.print(x); // Simple one time operation
}