Building a gesture-based interface with PyAutoGUI
Now that we can recognize the hand gestures with the Raspberry Pi Pico, we must build a touchless interface for YouTube video playback.
In this recipe, we will implement a Python script to read the recognized motion that's transmitted over the serial and use the PyAutoGUI
library to build a gesture-based interface to play, pause, mute, unmute, and change YouTube videos.
The following Python script contains the code that's referred to in this recipe:
07_gesture_based_ui.py
:
Getting ready
The Python script that we will develop in this recipe will not be implemented in Google Colaboratory because that requires accessing the local serial port, keyboard, and monitor. Therefore, we will write the program in a local Python development environment.
We only need two libraries to build our gesture...