GPIOZERO
Credit: https://gpiozero.readthedocs.io
OUR EXPERT
YOU NEED
Raspberry Pi 2, 3, 4, 5
Robot arm
DuPont jumper
cables M2M,
M2F, F2F
L298N H-bridge motor controller
L298N motor controller
Multimeter
Breadboard
https:// github.com/ mattmole/ LXF308- Robot-Arm
We’re going to be mixing some old-fashioned electronics with Python programming to convert a common toy robot arm into a computercontrolled device. While you may not be able to get the exact arm to convert, the aim here is that the article will give you the knowledge to determine whether a device is suitable for converting and let you know what to change.
Part of the magic of the Raspberry Pi is its ability to easily control external electronics through a bank of pins. These pins are known as GPIO, which stands for generalpurpose input/output. The pins are digital, can be used as input or output, support different protocols and standards, and use 3.3V logic. The voltage level is important and is discussed later. The fact that the GPIO is digital means that it is not possible to read analogue voltages – the Pi can detect either 0V or 3.3V signals, and these are referred to as 0 or 1, or low or high. A technique called pulse width modulation (PWM) can be used when pins are set to output mode, and by switching the pin on and off very quickly, different voltages can be simulated. This works due to the fact that the average voltage returned by the pin is between 0V and 3.3V. This technique can be used to dim an LED or change the speed of a motor.
For his