PWM Controlled DC Motor | What is MAP in arduino? on August 24, 2018 Get link Facebook X Pinterest Email Other Apps code:- const int PWM = 3; const int analogPin = 0; void setup() { Serial.begin(9600); } void loop() { int adc = analogRead(analogPin); int val = map(adc, 0, 1023, 0, 255); Serial.println(val); analogWrite(PWM, val); } Comments
Comments
Post a Comment