# include # include LiquidCrystal_I2C lcd(0x27,20,4); void setup() { pinMode(2, INPUT); pinMode(3, INPUT); pinMode(4, INPUT); pinMode(5, INPUT); Serial.begin(9600); lcd.init(); lcd.backlight(); } void loop() { int x1 = digitalRead(2); int x2 = digitalRead(3); int x3 = digitalRead(4); int x4 = digitalRead(5); int A = 360 -((x1*8 + x2*4 + x3*2 + x4)*22.5); lcd.clear() ; lcd.setCursor(9,1); lcd.print(A); delay (50); }