Reader small image

You're reading from  Android Things Quick Start Guide

Product typeBook
Published inAug 2018
PublisherPackt
ISBN-139781789341799
Edition1st Edition
Right arrow
Author (1)
Raul Portales
Raul Portales
author image
Raul Portales

Raul Portales is a software engineer who has had a love for computers, electronics, and gadgets in general for as long as he remembers. He jumped into Android as soon as it was released. Raul has worked on social networks, education, healthcare, and even founded a gaming studio and a consultancy company. Specializing in mobile and UX, he speaks frequently at conferences and meetups. Raul's love for electronics reignited when Google announced Android Things. He started tinkering with it with the first Developer Preview, which lead to adding the IoT category on his Google Developer expert profile.
Read more about Raul Portales

Right arrow

PWM overview

PWM is an output digital signal that is commonly used to apply a proportional control signal to an external device using a single digital output pin.

PWM is a square wave (no intermediate values, only 0 and 1) that oscillates according to a given frequency and duty cycle. It encodes the information in the length of the pulse, hence its name. A Pulse Width Modulation signal has two components:

  • Frequency (expressed in Hz), which describes how often the output pulse repeats
  • Duty cycle (expressed as a percentage), which describes the amount of time the pulse is on

For example, a PWM signal set to 50% duty is active for half of each cycle:

You can adjust the duty cycle to increase or decrease the amount of time the signal is on, which is reflected in the average value of it (the analog equivalent). The following diagram shows how the signal looks like with 0%, 25%, and...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Android Things Quick Start Guide
Published in: Aug 2018Publisher: PacktISBN-13: 9781789341799

Author (1)

author image
Raul Portales

Raul Portales is a software engineer who has had a love for computers, electronics, and gadgets in general for as long as he remembers. He jumped into Android as soon as it was released. Raul has worked on social networks, education, healthcare, and even founded a gaming studio and a consultancy company. Specializing in mobile and UX, he speaks frequently at conferences and meetups. Raul's love for electronics reignited when Google announced Android Things. He started tinkering with it with the first Developer Preview, which lead to adding the IoT category on his Google Developer expert profile.
Read more about Raul Portales