/// <summary> /// Perform an analog write (PWM) operation. /// </summary> /// <param name="pin"> /// The Arduino GPIO pin on which to generate the pulse train. /// Pins 3, 5, 6, 7, 8, 9, 10, or 11 are valid. /// </param> /// <param name="value">The analong value, which translates to the /// duty cycle of the pulse train. Range: 0-2^analogWriteResolution(x) /// - 0 - 0% duty cycle (no pulses are generated, output is LOW) /// - 2^analogWriteResolution(x) - 100% duty cycle (pulse train is HIGH /// continuously) /// </param> public void AnalogWrite(ArduinoPin pin, uint value) { ArduinoInterop.analogWrite((uint)pin, value); }
/// <summary> /// Perform an analog write (PWM) operation. /// </summary> /// <param name="pin"> /// The Arduino GPIO pin on which to generate the pulse train. /// Pins 3, 5, 6, 7, 8, 9, 10, or 11 are valid. /// </param> /// <param name="value">The analong value, which translates to the /// duty cycle of the pulse train. Range: 0-2^analogWriteResolution(x) /// - 0 - 0% duty cycle (no pulses are generated, output is LOW) /// - 2^analogWriteResolution(x) - 100% duty cycle (pulse train is HIGH /// continuously) /// </param> public void AnalogWrite(uint pin, uint value) { ArduinoInterop.analogWrite(pin, value); }