Reading encoders
A hall-effect sensor varies its output voltage in response to a magnetic field. The eight-pole neodymium magnetic disk attached to the motor shaft can generate a magnetic field around the hall-effect sensor. You can connect the wheel encoders (hall-effect sensor) with Arduino interrupt pins (digital pin 2 and 3 for UNO) to read pulses. You can use either the RISING, FALLING, or CHANGE mode to define when the interruption should be triggered. You will get different results depending on the mode you use.
Creating a Blynk app
The following steps will describe how to modify the Mini Round Robot Blynk app you built in Chapter 2, Building a Mini Round Robot with Original ESP8266, to read and display the distance traveled and average speed of the chassis:
- Open the Mini Round Robot Blynk app (Figure 3.5). Switch the app to the
EDITmode if it is in thePLAYmode:

Figure 3.5: The Mini Round Robot app created in chapter 2, Building a Mini Round Robot with Original ESP8266
- Tap on the
Widget...