project 13 :LIGHT DIMMER

LIGHT DIMMER

IN THIS PROJECT, YOU’LL CREATE A DIMMER SWITCH BY ADDING A POTENTIOMETER TO CONTROL THE BRIGHTNESS OF AN LED.

PARTS REQUIRED
• Arduino board
• Breadboard
• Jumper wires
• LED
• 50k-ohm potentiometer
• 470-ohm resistor

The Sketch This sketch works by setting pin A0 as your potentiometer and pin 9 as an OUTPUT to power the LED. You then run a loop that continually reads the value from the potentiometer and sends that value as voltage to the LED. The voltage value is between 0–5 volts, and the brightness of the LED will vary accordingly. /* http://arduino.cc/en/Reference/AnalogWrite by Tom Igoe from http:itp.nyu.edu/physcomp/Labs/AnalogIn */ 


int potPin = A0; // Analog input pin connected to the potentiometer int potValue = 0; // Value that will be read from the potentiometer int led = 9; // Pin 9 (connected to the LED) is capable of PWM // Runs once at beginning of the program void setup() { pinMode(led, OUTPUT); // Set pin 9 to output } // Loops continuously void loop() { potValue = analogRead(potPin); // Read potentiometer value // from A0 pin analogWrite(led, potValue/4); // Send potentiometer value to LED // to control brightness with PWM delay(10); // Wait for 10 ms }

You may like these posts

Commentaires

  1. To insert a code use <i rel="pre">code_here</i>
  2. To insert a quote use <b rel="quote">your_qoute</b>
  3. To insert a picture use <i rel="image">url_image_here</i>
Tinggalkan komentar sesuai topik tulisan, komentar dengan link aktif tidak akan ditampilkan.
Admin dan penulis blog mempunyai hak untuk menampilkan, menghapus, menandai spam, pada komentar yang dikirim
Affordability

Affordability

Design must reflect the practical and aesthetic in business but above all... good design must primarily serve people. Build beautiful websites in mere minutes.

Basic

Create email templates for yourself.

  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
$5 Per User Per Month

Enterprise

Create email templates for yourself.

  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
$10 Per User Per Month
advertise

Business

Create email templates for yourself.

  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
  • White Hat SEO
$19.99 Per User Per Month

Retina Ready

Build trust with prospective clients, delight existing customers, and increase the efficiency

Welcome to

Best website for Blog App. Business. Digital. Marketing. Service.

Even in the most uncertain times, Help Scout keeps you connected with customers.

Frequently asked questions

01. How can I download the app ?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dignissimos sequi placeat distinctio dolor, amet magnam voluptatibus eos ex vero, sunt veritatis esse. Nostrum voluptatum et repudiandae vel sed, explicabo in?
02. How can I install the app ?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dignissimos sequi placeat distinctio dolor, amet magnam voluptatibus eos ex vero, sunt veritatis esse. Nostrum voluptatum et repudiandae vel sed, explicabo in?
03. How can I upgrade my current plan ?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dignissimos sequi placeat distinctio dolor, amet magnam voluptatibus eos ex vero, sunt veritatis esse. Nostrum voluptatum et repudiandae vel sed, explicabo in?
04. How can I active the app's features ?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dignissimos sequi placeat distinctio dolor, amet magnam voluptatibus eos ex vero, sunt veritatis esse. Nostrum voluptatum et repudiandae vel sed, explicabo in?
05. How can I download the app ?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dignissimos sequi placeat distinctio dolor, amet magnam voluptatibus eos ex vero, sunt veritatis esse. Nostrum voluptatum et repudiandae vel sed, explicabo in?
06. How can I install the app ?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dignissimos sequi placeat distinctio dolor, amet magnam voluptatibus eos ex vero, sunt veritatis esse. Nostrum voluptatum et repudiandae vel sed, explicabo in?
07. How can I upgrade my current plan ?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dignissimos sequi placeat distinctio dolor, amet magnam voluptatibus eos ex vero, sunt veritatis esse. Nostrum voluptatum et repudiandae vel sed, explicabo in?
08. How can I active the app's features ?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Dignissimos sequi placeat distinctio dolor, amet magnam voluptatibus eos ex vero, sunt veritatis esse. Nostrum voluptatum et repudiandae vel sed, explicabo in?

We tried to make

Integrations

Create stunning, effective sales documents with custom-designed theme & template.

Marketing

Create stunning, effective sales documents with custom-designed theme & template.

Dedicated Support

Create stunning, effective sales documents with custom-designed theme & template.

Best Features

Our features will help
to improve busines

Sales teams use PandaDoc to improve deal workflow, insights, and speed while delivering an amazing buying experience. Get your documents out the door fast to keep deals.

Rechercher dans ce blog

advertise
advertise
advertise

Built in Browsers

Build trust with prospective clients, delight existing customers, and increase the efficiency

Extreme Security

Build trust with prospective clients, delight existing customers, and increase the efficiency

Clean Design

Build trust with prospective clients, delight existing customers, and increase the efficiency

Easy Customize

Build trust with prospective clients, delight existing customers, and increase the efficiency

Awesome Design

Build trust with prospective clients, delight existing customers, and increase the efficiency