Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Arduino BLINK Blueprints

You're reading from   Arduino BLINK Blueprints Get the most out of your Arduino to develop exciting and creative LED-based projects

Arrow left icon
Product type Paperback
Published in May 2016
Publisher Packt
ISBN-13 9781785284182
Length 134 pages
Edition 1st Edition
Tools
Arrow right icon
Authors (2):
Arrow left icon
Utsav Shah Utsav Shah
Author Profile Icon Utsav Shah
Utsav Shah
Samarth Shah Samarth Shah
Author Profile Icon Samarth Shah
Samarth Shah
Arrow right icon
View More author details
Toc

Developing an LED night lamp

So now we have developed our mood lamp, but it will turn on only when we connect a power supply to Arduino. It won't turn on or off depending on the darkness of the environment. Also, to turn it off, we have to disconnect our power supply from Arduino. In this section, we will learn how to use switches with Arduino.

Introduction to switch

Switches are one of the most elementary and easy-to-overlook components. Switches do only one thing: either they open a circuit or short circuit. Mainly, there are two types of switches:

  • Momentary switches: Momentary switches are those switches which require continuous actuation—like a keyboard switch and reset button on the Arduino board
  • Maintained switches: Maintained switches are those switches which, once actuated, remain actuated—like a wall switch.

Normally, all the switches are NO (normally opened) type switches. So, when the switch is actuated, it closes the path and acts as a perfect piece of conducting...

You have been reading a chapter from
Arduino BLINK Blueprints
Published in: May 2016
Publisher: Packt
ISBN-13: 9781785284182
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime