The aim of the program is that when the button is pressed, it asks the user to input an IP Address. The program should ping the inputted IP and if the response is successful a green LED should turn on. If the response is not successful a red LED should turn on.
Further details are given below.
- A red wire that is connected to the 3v3 pin on the Pi is attached to the (+) side of the breadboard.
- The black wire that is connected to the top third pin (Ground) on the Pi and to the (-)side of the breadboard.
- The green and yellow wires are connected to GPIO 17 and GPIO 20 and to the (+) long leg of the yellow and red LED respectively.
- The 330Ω resistors are attached to the (-) short legs of the green and red LEDs and to the (-) side of the breadboard.
- Insert button.
- The 4.4kΩ resistor is connected from the positive rail to bottom right leg of the button.
- Black wire from negative rail to top left leg of the button.
- Blue wire attached to GPIO 21 and to the row of the bottom right leg of the button.