WOLFRAM SYSTEMMODELER

DimmingLed

Changing the intensity of an LED

Diagram

Wolfram Language

In[1]:=
Click for copyable input
SystemModel["ModelPlug.Examples.DimmingLed"]
Out[1]:=

Information

Hardware Components Used

  • 1 Arduino board
  • 1 LED
  • 1 resistor 680 ohms

Description

This example uses the AnalogOutput component to change the light intensity of an LED. AnalogOutput uses the Arduino function 'analogWrite', which produces a PWM (Pulse-Width Modulated) signal. This type of signal can be used to directly control the LED intensity. The following figure shows the connections.

For more information on the PWM outputs, the Arduino Playground is a good resource.

Components (3)

arduino

Type: Arduino

analogOutput

Type: AnalogOutput

sine

Type: Sine