The video is the update to the previous prototype Demonstration Kit (Rev. 2) which is using Raspberry Pi Model B with fewer GPIOs compare to Raspberry Pi Model 2.
The function here is very limited compare to the program I had written in BBC BASIC Programming Language due to the very limited reference materials of Phyton Programming Language. I would say that I cannot easily convert the complex program I made using the BBC BASIC to Phyton without a lot of effort and time. Until now, I am searching for all the Phyton commands needed to write a complex program for Raspberry Pi.
Unfortunately, the BBC BASIC which is ported to Raspbian remains unstable and with incompatibility issues as of March 2020. I tried it with Raspberry Pi Zero W and Model 2 and Model A+ but just gave me some headache and frustration.
Following is the basic program written in Phyton 3.4 to activate the 21 GPIOs:
PHYTON 3.4
#!/sr/bin/python3
# Programmed by Rolly Estomaguio on April 19, 2020 to test 21 GPIOs of Raspberry Pi Model B.
import RPi.GPIO as GPIO # using RPi.GPIO
from time import sleep
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BCM)
x= 17, 18, 27, 23, 24, 10, 9, 25, 11, 8, 7, 5, 6, 12, 13,19, 16, 26, 20, 21, 14 ,15
GPIO.setup(x,GPIO.OUT)# make pin into an output
while True:
GPIO.output(x, 0)# reset to LOW all GPIO
sleep (0.1)
GPIO.output(17,1)
sleep (1)
GPIO.output(17,0)
sleep (1)
GPIO.output(18,1)
sleep (1)
GPIO.output(18,0)
sleep (1)
GPIO.output(27,1)
sleep (1)
GPIO.output(27,0)
sleep (1)
GPIO.output(23,1)
sleep (1)
GPIO.output(23,0)
sleep (1)
GPIO.output(24,1)
sleep (1)
GPIO.output(24,0)
sleep (1)
GPIO.output(10,1)
sleep (1)
GPIO.output(10,0)
sleep (1)
GPIO.output(9,1)
sleep (1)
GPIO.output(9,0)
sleep (1)
GPIO.output(25,1)
sleep (1)
GPIO.output(25,0)
sleep (1)
GPIO.output(11, 1)
sleep (1)
GPIO.output(11,0)
sleep (1)
GPIO.output(8, 1)
sleep (1)
GPIO.output(8,0)
sleep (1)
GPIO.output(7, 1)
sleep (1)
GPIO.output(7,0)
sleep (1)
GPIO.output(5,1)
sleep (1)
GPIO.output(5,0)
sleep (1)
GPIO.output(6,1)
sleep (1)
GPIO.output(6,0)
sleep (1)
GPIO.output(12,1)
sleep (1)
GPIO.output(12,0)
sleep (1)
GPIO.output(13, 1)
sleep (1)
GPIO.output(13,0)
sleep (1)
GPIO.output(19,1)
sleep (1)
GPIO.output(19,0)
sleep (1)
GPIO.output(26,1) # use as HIGH to enable L293
GPIO.output(21,1) # HIGH for counter-clockwise rotation
sleep (0.1)
GPIO.output(20,0)
sleep (0)
GPIO.output(26,0)
GPIO.output(21,0)
sleep (0.1)
GPIO.output(20,0)
sleep (0)
GPIO.output (26,1)
GPIO.output (20,1) # HIGH to enable solenoid
sleep (0.1)
GPIO.output (21,0) # LOW to ennable solenoid
sleep (0.1)
GPIO.output (26,0) # reset to LOW to disable solenoid
sleep (0.1)
GPIO.output (20,0) # reset to LOW to stop solenoid
sleep (0.1)
GPIO.output (26,1)
sleep (0.1)
GPIO.output (14,1) # HIGH to enable motor
sleep (0.1)
GPIO.output (15,0) # LOW to enable motor
sleep (0.1)
GPIO.output (26,0) # LOW to disable motor
GPIO.output (14,0)
sleep (0.1)
GPIO.output (15,0)
sleep (0.1)