Controlling the gripper with Blynk
The gripper can be easily controlled with a simple Blynk app. In the previous few chapters, you have written different code for controlling DC motors with Blynk apps. So, this chapter will only focus on how to control the gripper with the Blynk app.
Creating the Blynk app
The following steps will describe you how to add a Slider widget to your Blynk app:
- Tap anywhere on the canvas to open the widget box.
- From the widget list, tap on the
SLIDER
. - Tap and hold the widget to drag it to a new position if you want.
- The most important parameter to set is
PIN
. In theOUTPUT
section, select the output as virtual pin,V1
. - Replace the maximum value,
255
with1023
.
Software
Listing 7-1 shows the Arduino sketch that can be used to control the gripper with the Blynk app. The functions for controlling the two DC gear motors are not included in the code to only focus on the gripper (servo). Upload the code to the Arduino using the Arduino IDE by connecting the Arduino to your computer...