Project 4

Create a program that asks the user to input a number. A buzzer should beep according to the number of times inputted by the user. Use a loop.

 

Items used to build the circuit:

  • 3 wires
  • buzzer
  • breadboard

20170402_170824.jpg

 

Code:

Capture

 

Building the circuit:

connect the red wire to the GPIO 17 and to the buzzer on the breadboard. use the blue wire to connect the buzzer to the negative rail. use the black wire to connect the negative rail to the ground pin on the PI.

20170329_110009.jpg

 

 

 

Advertisements

Project 3

Attach one button and two LEDs on the breadboard. Using python create a program 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.

Items used to build the circuit:

  • 2 LED
  • 3 wires
  • 2 resistor
  • breadboard

20170401_195150.jpg

 

Code:

Capture3

 

Building the circuit:

connect the red wire to the GPIO 17 and the second wire to GPIO 5. connect the same two wires to the leds on the breadboard. connect the resistor from the led to the negative rail on the breadboard use one resistor per led. use the third wire to connect the negative rail to the ground pin on the PI

 

20170329_114050.jpg

 

 

Project 2

Attach one LED on the breadboard. Using python, LED and a resistor broadcast ‘SOS’ in Morse Code.

Items used to build the circuit:

  • 1 LED
  • 2 wires
  • 1 resistor
  • breadboard

20170331_115751

Code:

Capture

Capture2

Building the circuit:

Connect the green wire to GIP0 17 on the IP and the black wire to the ground pin. connect the green wire to the led on the breadboard. next the resistor to the negative rail on the board and the black wire from the negative rail to the ground pin on the pi

20170328_180510

Demo:

videotogif_2017.03.31_17.02.07.gif

Project 1

Attach one LED on the breadboard. Using python create a program that asks the user to input his name and year of birth. Store the values in two separate variables and print on the screen the following message: “Hello Richard, your age is 28”. An LED should blink relatively to the age of the person. Example, in this case it would blink 28 times. Use a loop.

 

Items used to build the circuit:

  • 1 LED
  • 2 wires
  • 1 resistor
  • breadboard

20170331_115751.jpg

 

Code:

p1 code

Building the circuit:

Connect the green wire to GIP0 17 on the IP and the black wire to the ground pin. connect the green wire to the led on the breadboard. next the resistor to the negative rail on the board and the black wire from the negative rail to the ground pin on the pi

20170328_180510.jpg

Demo:

giphy.gif