RobotikaWall
Add message
Add a new message
Title
Text
[code]// source: http://platformio.org/lib/show/1739/ServoESP32 #include "LearningKit.h" #include
static const int servoPin = S1; static const int potentiometerPin = 32; Servo servo1; void setup() { Serial.begin(115200); servo1.attach(servoPin); } void loop() { int servoPosition = map(analogRead(potentiometerPin), 0, 4096, 0, 180); servo1.write(servoPosition); Serial.println(servoPosition); delay(20); }[/code]
Password
Save