Arduino Toolkit - @arduino/writePWMVoltage


: writePWMVoltage (ar, pin, voltage)

Emulate an approximate voltage out of a pin using PWM.

Inputs

ar - connected arduino object

pin - pin to write to.

voltage - voltage to emulate with PWM, between 0 - 5.0

Example

 
 a = arduino();
 writePWMVoltage(a,'D5',1.0);
 
 

See also: arduino, writePWMDutyCycle.