void setup() { Serial.begin(115200); } void loop() { int value = analogRead(A0); // 0 ... 1023 -> 0 ... 270 degrees int angle = (value / 1023.0) * 270.0; // 1-degree (integer) precision is enough Serial.println(angle); delay(10); }