WOLFRAM SYSTEM MODELER
AnalogInputReads an analog signal from the specified pin |
SystemModel["ModelPlug.Pins.AnalogInput"]
Reads an analog signal from the specified pin. This component uses the 'analogRead' function of the Arduino.
Signal Range: By default, the signal goes from 0 to 1 where 0 represents no voltage and 1 the voltage reference of the ADC in the board. This signal can be scaled by setting the 'MinValue' and 'MaxValue' parameters.
Not all pins support analog input. Check the documentation of your board to find the pin capabilities.
Pin |
Value: 0 Type: Integer Description: Number of the analog pin |
---|---|
InitValue |
Value: 0 Type: Real Description: Initial value until the board responds |
MinValue |
Value: 0 Type: Real Description: Minimum value when the ADC reads 0 |
MaxValue |
Value: 1 Type: Real Description: Maximum value when the ADC reads 1024 |
y |
Type: RealOutput Description: 'output Real' as connector |
|
---|---|---|
pinConnector |
Type: PinConnector |
ModelPlug.Examples Reading analog signals |
|
ModelPlug.Examples A simple On/Off controller |