WOLFRAM SYSTEM MODELER
AnalogOutputWrites an analog signal to the specified pin |
SystemModel["ModelPlug.Pins.AnalogOutput"]
Writes an analog signal to the specified pin. This component uses the 'analogWrite' function of the Arduino.
Signal Range: By default, the signal goes from 0 to 1, where 0 represents no voltage and 1 the maximum voltage that PWM/DAC of your board can provide. This signal can be scaled by setting the 'MinValue' and 'MaxValue' parameters.
Analog outputs use the PWM capabilities of the pins, therefore, they do not provide a continuous signal. If you want to get a continuous signal, you need to add a lowpass filter. Visit the Arduino Playground for more information on PWM.
Not all pins support analog output. Check the documentation of your board to find the pin capabilities.
Pin |
Value: 0 Type: Integer Description: Number of the PWM/DAC pin |
---|---|
MinValue |
Value: 0 Type: Real Description: Value considered as minimum by the PWM/DAC |
MaxValue |
Value: 1 Type: Real Description: Value considered as maximum by the PWM/DAC |
u |
Type: RealInput Description: 'input Real' as connector |
|
---|---|---|
pinConnector |
Type: PinConnector |
ModelPlug.Examples Changing the intensity of an LED |