Using GPIO

The General Purpose Input/Output pins allow you to control and interact with the real world.

Learn more here:

Sample Use

A simple use is to switch a LED on and off.

Add the LED

You need:

  • The longer leg (known as the ‘anode’), is always connected to the positive supply of the circuit.
  • The shorter leg (known as the ‘cathode’) is connected to the negative side of the power supply, known as ‘ground’.

You will be using a 330Ω resistor. You can identify the 330Ω resistors by the colour bands along the body. The colour coding will depend on how many bands are on the resistors supplied:

  • If there are four colour bands, they will be Orange, Orange, Brown, and then Gold.
  • If there are five bands, then the colours will be Orange, Orange, Black, Black, Brown.

Buy the components

You can get all these, and more, in the £5 CamJam EduKit from The Pi Hut (

Build the flow

Add a GPIO node:

Edit the node to set the GPIO port to use:

The initial state of the port can also be set:

Add open and close intents nodes to the flow to switch the GPIO: