Aim: The aim of Project 3 is to create a program that when a button is pressed, it asks the user to enter an IP Address. The program will ping with IP inputted by the user. If the response is successful a green LED will turn on, if the response is not successful, a red LED will turn on.

Hardware and software:

  • Raspberry Pi 3
  • Breadboard
  • Push button
  • 1 green 5mm LED
  • 1 red 5mm LED
  • 3 resistors
  • 2 male to female red wires
  • 2 black male to female wires
  • 1 black male to female wire
  • Python 3

First, the button was connected with a resistor, a red wire(connected to 3.3V not to damage the button) and green wire onto the breadboard then, the green LED and red LED were connected with a resistor, 2 blue wires and 1 red wire(connected to 3.3V not to damage the LEDs.

GPIO Ports used for the LEDs: 17 and 27

GPIO used for the button: 13


diagram pic.JPG



code 1.JPGcode 2.JPG