How do you plan to solve it?
/*Paste your code here*/
#define POT_PIN A0
#define MOTOR_PIN 5
int pot_value=0, mapped_value=0;
void deriveMotor(int v)
{
analogWrite(MOTOR_PIN,v);
}
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
}
void loop() {
// put your main code here, to run repeatedly:
pot_value = analogRead(POT_PIN);
mapped_value = map(pot_value,0,1023,0,255);
deriveMotor(mapped_value);
}
Add video of output (know more)
Add a photo of your hardware showing the output.