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
Hands-On Internet of Things with Blynk

You're reading from   Hands-On Internet of Things with Blynk Build on the power of Blynk to configure smart devices and build exciting IoT projects

Arrow left icon
Product type Paperback
Published in May 2018
Publisher Packt
ISBN-13 9781788995061
Length 271 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Pradeeka Seneviratne Pradeeka Seneviratne
Author Profile Icon Pradeeka Seneviratne
Pradeeka Seneviratne
Arrow right icon
View More author details
Toc

Slider

The Slider widget allows you to send a specific range of values from your Blynk app to the hardware (Raspberry Pi). It is analogous to a potentiometer in electronics. The default value of the Slider widget provides a value range of 0 to 255. As examples, sliders can be used to control the brightness of an LED or to control a servo motor.

In this example project, you will control the brightness of an LED attached to the Raspberry Pi BCM_GPIO pin 18, which is a Pulse Width Modulation (PWM) pin.

Brightness can be changed by analog or PWM. With analog, you can control the brightness by simply adjusting the DC current in the wire. But with PWM, you can change the brightness by varying the duty cycle of a constant current in the wire. Therefore, PWM can be implemented on any digital pin without using a potentiometer to control the current flow. PWM is the most appropriate method...

lock icon The rest of the chapter is locked
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