Using digital pins

Let's build a Blynk app and write code to display data coming from the potentiometer attached to the Raspberry Pi using digital pins. To build the project, you will need the following things:

  • A potentiometer
  • Breadboard
  • Hookup wires

Following diagram shows the wiring diagram for building the circuit. Connect the center pin of the potentiometer to the Raspberry Pi BCM_GPIO pin 18 (WiringPi pin 1). Connect one of the outer pins of the potentiometer with the Raspberry Pi 5V pin. Connect the other outer pin of the potentiometer with Raspberry Pi GND:

Potentiometer attached to the Raspberry Pi BCM_GPIO pin 18 (WiringPi pin 1) ...

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.