espertusers

Open full view…

Espresso Lite 2.0 PWM

gorgom
Tue, 26 Jul 2016 00:37:00 GMT

May I know how to use PWM using this board. I'm using command analogWrite(12, 255); to generate PWM signal at pin 12 but when I check with multimeter the reading is only 0.72 V. With digitalWrite(12, HIGH); command, the pin give 3.3 V. Command analogWrite(12,255); should give same value with digitalWrite(12, HIGH);, right? Or did I miss something? Thank you

willhooi
Fri, 05 Aug 2016 14:22:51 GMT

No. Technically the analog values is between 0-1023. However the value may not necessary be absolute as its value is the product of output voltage divided by operating voltage (3.3V) and the max analog value. If you using it to run the servo, just map the analog values between 0-1023 with servo rotation 0-179.