WOLFRAM SYSTEM MODELER
BlinkLedBasic example of blinking an LED |
SystemModel["ModelPlug.Examples.BlinkLed"]
This example uses the DigitalOutput component to control the built-in LED on the Arduino board (this pin is controlled using pin 13). It uses a BooleanPulse component from the Modelica Standard Library to produce an On/Off signal that is fed into the DigitalOutput component. This will make the LED blink.
If you would like to add an external LED, you can connect it to pin 9 as shown in the figure below and add one more DigitalOutput component in the model to control the LED.
arduino |
Type: Arduino Description: Component with default configuration for Arduino boards |
|
---|---|---|
digitalOutput |
Type: DigitalOutput Description: Writes a digital signal to the specified pin |
|
booleanPulse |
Type: BooleanPulse Description: Generate pulse signal of type Boolean |