#include <Servo.h>
const int SERVO_PIN {12};
int const LYS_PIN {14};
Servo Blaa_plastik;
void setup() {
// put your setup code here, to run once:
Blaa_plastik.attach(SERVO_PIN);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
delay(200);
int lys = analogRead(LYS_PIN);
Serial.print(lys);
int servo_ind = map(lys, 0, 1023, 0, 180);
Serial.print(" ");
Serial.println(servo_ind);
Blaa_plastik.write(servo_ind);
}