Postingan

Menampilkan postingan dari Juni, 2023

Integrasi Arduino Atmega,Keypad, LCD, Buzzer

Gambar
 #include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> #include <LiquidCrystal.h> #include <LiquidCrystal_I2C.h> #include <Keypad.h> #include <Servo.h> #include <TM1637Display.h> //OLED #define SCREEN_WIDTH 128 #define SCREEN_HEIGHT 32  #define OLED_RESET 4  Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET); //LCD //const int rs = 44, en = 42, d4 = 52, d5 = 50, d6 = 48, d7 = 46; //LiquidCrystal lcd(rs, en, d4, d5, d6, d7); LiquidCrystal_I2C lcd(0x27, 20, 4); //LED const int greenLedPin = 7; // Pin connected to the green LED const int yellowLedPin = 8; // Pin connected to the yellow LED const int redLedPin = 9; // Pin connected to the red LED int kondisi; //KEYPAD const int ROW_NUM = 4; //four rows const int COLUMN_NUM = 4; //four columns char keys[ROW_NUM][COLUMN_NUM] = {   {'1','2','3', 'A'},   {'4','5','6', 'B'},   {'7'