void setup() { Serial.begin(115200); } void loop() { int value = (sin(millis() / 200.0) * 500) + 500; Serial.println(value); delay(10); }