const int potPin = 27 ;
const int ledpin = 3 ;
void setup() {
// put your setup code here, to run once:
Serial1.begin(9600);
pinMode(3, OUTPUT);
}
void loop() {
int potValue =analogRead(27)
int ledbrightness = map(potValue,0,1023,0,255)
analogWrite(3,ledbrightness);
// put your main code here, to run repeatedly:
delay(100); // this speeds up the simulation
}