Using digital pins

Let's configure the Slider widget to control the brightness of the LED using digital pins:

  1. Tap the Slider widget to open the Slider Settings page:
Slider Settings page
  1. Tap PIN under OUTPUT. On the left-hand side of the popup, choose Digital, and on the right-hand side of the popup, under PIN, choose gp 18 PWM (this is the only pin available on Raspberry Pi for PWM). Then, tap OK:
Selecting a digital pin for PWM
  1. Change the maximum value for the OUTPUT to 1023 by replacing the default value of 255. Now, your Slider Settings ...

Get Hands-On Internet of Things with Blynk now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.