How do you plan to solve it?
/*Paste your code here*/ #define LED_PIN 3 int pot_value = 0; int mapped_value = 0; void setup() { // put your setup code here, to run once: Serial.begin(115200); pinMode(LED_PIN,OUTPUT); } void loop() { pot_value = analogRead(A0); mapped_value = map(pot_value,0,1023,0,255); analogWrite(LED_PIN,mapped_value); delay(50); }
Add video of output (know more)
https://youtube.com/shorts/2u01cHqKr0Q?feature=share
Add a photo of your hardware showing the output.
Submit Your Solution