ronfrtek
Published © LGPL

Controlling LED Brightness With a Potentiometer and Arduino

In this tutorial we will learn how to control the LED brightness with a potentiometer and Arduino.

BeginnerProtip1 hour499
Controlling LED Brightness With a Potentiometer and Arduino

Things used in this project

Hardware components

Arduino UNO & Genuino UNO
Arduino UNO & Genuino UNO
×1
Potentiometer, Slide
Potentiometer, Slide
×1

Software apps and online services

Arduino IDE
Arduino IDE
visuino

Story

Read more

Schematics

2020-01-13_9-53-51_d3gENN0OD4.jpg

Code

potenciometer-led.visuino

Arduino
{
  "Version": "2",
  "Product": "Visuino Pro - Visual Arduino Programming",
  "Units": [
    {
      "Type": "Diagram",
      "Name": "__OpenWireRootUnit__",
      "*": [
        {
          "X": 256,
          "Name": "Arduino",
          "Instance": {
            "Serial": {
              "*": [
                {
                  "+": "TArduinoHardwareSerial"
                }
              ]
            },
            "+": "TArduinoBoard",
            "AnalogInputReference": "Default",
            "Modules": {
              "*": [
                {
                  "+": "TArduinoEEPROMModule"
                },
                {
                  "+": "TArduinoProcessor328Module"
                },
                {
                  "+": "TArduinoWatchdogTimerModule"
                }
              ]
            },
            "I2CChannels": {
              "*": [
                {
                  "+": "TArduinoI2C"
                }
              ]
            },
            "Digital": {
              "*": [
                {
                  "+": "TArduinoAdditionalDigitalSerial0Channel"
                },
                {
                  "+": "TArduinoAdditionalDigitalSerial0Channel"
                },
                {
                  "+": "TArduinoAdditionalDigitalInterruptChannel"
                },
                {
                  "+": "TArduinoBasicDigitalPWMInterruptChannel"
                },
                {
                  "+": "TArduinoAdditionalDigitalChannel"
                },
                {
                  "+": "TArduinoBasicDigitalPWMChannel"
                },
                {
                  "+": "TArduinoBasicDigitalPWMChannel"
                },
                {
                  "+": "TArduinoAdditionalDigitalChannel"
                },
                {
                  "+": "TArduinoAdditionalDigitalChannel"
                },
                {
                  "+": "TArduinoBasicDigitalPWMChannel"
                },
                {
                  "AnalogInputPin": {
                    "SourcePin": {
                      "Name": "__OpenWireRootUnit__.Arduino.Digital.Digital[ 14 ]\/AnalogIn[ 0 ].OutputPin",
                      "ID": "__OpenWireRootUnit__.Arduino.Digital._Item14.OutputPin"
                    }
                  },
                  "+": "TArduinoBasicDigitalPWMChannel"
                },
                {
                  "+": "TArduinoBasicDigitalPWMSPI0Channel"
                },
                {
                  "+": "TArduinoAdditionalDigitalSPI0Channel"
                },
                {
                  "+": "TArduinoAdditionalDigitalSPI0Channel"
                },
                {
                  "OutputPin": {
                    "SinkPins": [
                      {
                        "Name": "__OpenWireRootUnit__.Arduino.Digital.Digital[ 10 ].AnalogInputPin",
                        "ID": "__OpenWireRootUnit__.Arduino.Digital._Item10.AnalogInputPin"
                      }
                    ]
                  },
                  "+": "TArduinoCombinedAnalogDigitalChannel"
                },
                {
                  "+": "TArduinoCombinedAnalogDigitalChannel"
                },
                {
                  "+": "TArduinoCombinedAnalogDigitalChannel"
                },
                {
                  "+": "TArduinoCombinedAnalogDigitalChannel"
                },
                {
                  "+": "TArduinoCombinedAnalogDigitalI2C0Channel"
                },
                {
                  "+": "TArduinoCombinedAnalogDigitalI2C0Channel"
                }
              ]
            },
            "SPIChannels": {
              "*": [
                {
                  "+": "TArduinoSPI"
                }
              ]
            },
            "BoardType": "Arduino Uno"
          },
          "Type": "Component",
          "Y": 256
        }
      ]
    }
  ],
  "Content": "OpenWire Diagram"
}

Credits

ronfrtek

ronfrtek

27 projects • 7 followers
Arduino Fan!

Comments