Simple physical computing
Physical computing on the Raspberry Pi uses the GPIO pins on the right of the board, as shown here:
Figure 15.16 – The GPIO pins of the Raspberry Pi
The important things to remember are that the ground pins are negative and the voltage pins, 3V3 and 5V, are positive and always on. While the GPIO pins may have secondary specialist purposes, they are the ones we can turn on and off – they will deliver a positive current.
When we’re learning a new programming language, we start with the simplest possible program – Hello World:
Write-Output "Hello World"
In Python, we can write the following:
print("Hello World")
Physical computing is slightly different – we write a program to make an LED blink on and off. It doesn’t seem to matter what the platform is; this is where we start. For instance, the program to get an Arduino to blink an LED is written in C and looks...