In this recipe, we are going to do the reverse of what we did in the previous recipe. Here, we are going to see how to control a pin from a Node.js server, just by typing a command into your browser. Let's start!
The hardware configuration for this recipe is relatively simple, as we just want to check that we can change the state of a pin from a Node.js server.
We will test this with a simple LED and a 220 ohm resistor. You will also need a breadboard and some male/male jumper wires.
To connect the LED to the Galileo board, first place the LED and the resistor in series on the breadboard, by connecting the longest side of the LED (the anode) to the resistor. Then, connect the other resistor pin to the Galileo pin 7, and the other side of the LED (the cathode) to the ground.
This is the final result:
