#include <Servo.h>
#include <Adafruit_NeoPixel.h>
Servo myservo;
int potpin = 28;
int val;
#define PIN 15
#define NUMPIXELS 16
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
int delayval = 250; // delay for half a second
void setup() {
// put your setup code here, to run once:
strip.begin();
strip.show();
Serial1.begin(115200);
Serial1.println("Hello, Raspberry Pi Pico!");
myservo.attach(16);
}
void loop() {
// put your main code here, to run repeatedly:
delay(1); // this speeds up the simulation
val = analogRead(potpin);
val = map(val, 0, 1023, 0, 180);
myservo.write(val);
delay(15);
}