Simulasi Kalkulator sederhana menggunakan LCD 12C dan Keypad berbasis Arduino pada Software Proteus 8
Skematik Rangkaian Komponen yang digunakan - Arduino UNO - LM016L (LCD 16x2) - PCF8574 (Modul I2C) - Keypad Smalcalc (Keypad) Sketch Arduino #include <LiquidCrystal_I2C.h> LiquidCrystal_I2C lcd(0x27, 20, 2); #include <Keypad.h> const byte ROWS = 4; const byte COLS = 4; char keys [ROWS] [COLS] = { {'7', '8', '9', '/'}, {'4', '5', '6', '*'}, {'1', '2', '3', '-'}, {'C', '0', '=', '+'} }; byte rowPins[ROWS] = {2, 3, 4, 5}; byte colPins[COLS] = {6, 7, 8, 9}; Keypad myKeypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS ); float presentValue = false; float next = false;float final = false; String num1, num2; String answer = "0"; char op; void setup(){ lcd.init(); lcd.backlight(); lcd.setCursor(5,0); lcd.prin...