From 5cb4ca8b7f658753e24defb12b5768a63ffd2402 Mon Sep 17 00:00:00 2001 From: KillerBossOriginal Date: Tue, 3 Dec 2024 16:31:00 +0100 Subject: [PATCH] Initial Commit --- Promano.ino | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Promano.ino 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); +}