commit 5cb4ca8b7f658753e24defb12b5768a63ffd2402 Author: KillerBossOriginal Date: Tue Dec 3 16:31:00 2024 +0100 Initial Commit diff --git a/Promano.ino b/Promano.ino new file mode 100644 index 0000000..f7dce4e --- /dev/null +++ b/Promano.ino @@ -0,0 +1,25 @@ +#include +Servo myServo; +int const potPin = A0; +int potVal; +int angle; + +void setup() { + myServo.attach(8); + + Serial.begin(9600); +} + +void loop() { + potVal = analogRead(potPin); + angle = map(potVal, 0, 1023, 0, 179); + + Serial.print("Potval: "); + Serial.print(potVal); + Serial.print(" Angle: "); + Serial.print(angle); + + myServo.write(angle); + + delay(15); +}