Reader small image

You're reading from  Arduino Development Cookbook

Product typeBook
Published inApr 2015
Publisher
ISBN-139781783982943
Edition1st Edition
Tools
Concepts
Right arrow
Author (1)
Cornel M Amariei
Cornel M Amariei
author image
Cornel M Amariei

Cornel Amariei is a Romanian inventor and entrepreneur in the fields of Robotics and 3D printing. He has been working with the Arduino platform since its early days in 2007. His past experience involves large cargo gamma ray scanning robotics, ATM security systems, and blind assisting devices. In his spare time, he is a performing musician playing multiple instruments—predominately the guitar. He is also a swimmer, water polo player, and photographer. Over the years, he has built hundreds of Arduino projects, ranging from flying Quadcopters to levitating magnets and underwater robots. Currently, he splits his time between doing his undergraduate studies in electric engineering and computer science at Jacobs University in Bremen, Germany, and his start-ups and research and development job.
Read more about Cornel M Amariei

Right arrow

The toggle switch


A toggle switch can be very useful for various projects. It can hold one or more constant states. For example, we can have a few of them and configure a certain system to work a certain way based on the configuration. This is done all the time on computer motherboards and other electronic devices.

A two-state toggle switch is just like a standard push button; only, it remains in the state we put it in. An on-off switch is a two-state toggle switch. It becomes more useful when we have a three-state toggle switch as in this recipe. It has two usable states and an off state.

In this recipe, we will use a basic toggle switch to light up two LEDs. When the toggle switch is in one end position, only one LED will be switched on. If it is in the other end position, the other LED will be switched on. Finally, if the toggle switch is in the center, both LEDs will be switched off.

Getting ready

The following are the ingredients required to execute this recipe:

  • An Arduino board connected...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Arduino Development Cookbook
Published in: Apr 2015Publisher: ISBN-13: 9781783982943

Author (1)

author image
Cornel M Amariei

Cornel Amariei is a Romanian inventor and entrepreneur in the fields of Robotics and 3D printing. He has been working with the Arduino platform since its early days in 2007. His past experience involves large cargo gamma ray scanning robotics, ATM security systems, and blind assisting devices. In his spare time, he is a performing musician playing multiple instruments—predominately the guitar. He is also a swimmer, water polo player, and photographer. Over the years, he has built hundreds of Arduino projects, ranging from flying Quadcopters to levitating magnets and underwater robots. Currently, he splits his time between doing his undergraduate studies in electric engineering and computer science at Jacobs University in Bremen, Germany, and his start-ups and research and development job.
Read more about Cornel M Amariei