Project Python | Command Line Calender

You can make your own calendar and even add, update and view.

For your python code, copy and paste the following:


from time import sleep, strftime
name = “Libster”calendar = {}
def welcome():    print(“Welcome, ” + name + “!”)    print(“Calendar starting…”)    sleep(1)    print (“Today is “) + strftime( “%A %B %d, %Y”)     print (“The time is “) + strftime(“%I:%M:%S”)    sleep(1)    print(“What would you like to do?”)    def start_calendar():  welcome()  start = True  while start:    user_choice = raw_input(“Please choose A to Add, U to Update, V to View, X to Exit. “)    user_choice=user_choice.upper()    if user_choice == “V”:      if len(calendar.keys()) <1:        print “Your calendar is empty”      else:        print calendar    elif user_choice == “U”:        date = raw_input(“What date? “)        update = raw_input(“Enter the update: “)        calendar[date] = update        print(“Update successful.”)        print calendar    elif user_choice == “A”:        event = raw_input(“Enter event: “)        date = raw_input(“Enter date (MM/DD/YYYY): “)        if len(date) > 10 or int(date[6:]) < int(strftime(“%Y”)):            print(“Invalid date.”)              try_again = raw_input(“Try again? Y for Yes, N for No: “)            try_again = upper.try_again()            if try_again == “Y”:                continue            else:                start = False            else:            calendar[date] = event            print(“Event update successful.”)            print calendar    elif user_choice == “D”:        if calendar.keys(len(date)) < 1: #check this line if fail            print(“The calendar is empty.”)        else:            event = raw_input(“What event?”)             for date in calendar.keys():                if event == calendar[date]:                     del calendar[date] # deletes entire entry, inc date & event                print(“Event deleted.”)                print calendar            else:                print(“Incorrect date.”)    elif user_choice == “X”:        start = False    else:        print(“Invalid command.”)        breakstart_calendar()


 

Then in the command line, play your python code.

Screen Shot 2017-07-02 at 17.40.47

Above, the picture is an example of how it should turn out to be. I added an event, updated that same event and viewed! Don’t forget to try to experiment and maybe make this cooler.

Yours truly,

L.O.A.S.H

Learn Javascript|Magic Eight Ball

For this project, you will be making your own MAGIC EIGHT BALL! If you follow the code below, you will be on the right track. If you notice on the first line of code, there is a var userQuestion where you will be placing your question and then receiving a randomly picked output.

My input—–> var userQuestion = “Am I bored????!!?!?!??!”;

Screen Shot 2017-06-25 at 21.10.24

Screen Shot 2017-06-25 at 21.10.59

My output on console —->

Screen Shot 2017-06-25 at 21.11.07

Haha, well, I was kinda bored which makes this kinda accurate.

Yours truly,

L.O.A.S.H

L.O.A.S.H’s Guide to (nearly) Everything: Restarting Storage on Your Mac (Easy)

We wanted to clear the storage in our Mac Book but deleting all the files in the finder and countlessly searching on the internet didn’t seem to be helping us achieve our goal. If you go to the About this Mac, and select storage, you would see something like the screenshot below:

 Screen Shot 2017-06-24 at 09.05.35.png

My mom kept murmuring about that she couldn’t delete her movies and that it was taking up to much storage space on her computer. I deliberately went to her to stop the fuss. In this blog, you will learn how to make your storage space lessened.

Step 1:

Go to System Preferences.  Screen Shot 2017-06-24 at 09.22.21.png <— Looks like this. If you have a hard time looking for it, you can find it the spotlight at the top right area of your computer screen. It looks like a magnifying glass. Screen Shot 2017-06-24 at 09.24.18.png

Step 2:

When you open up your System Preferences, go to Startup Disk. I circle on the screenshot below.

 Screen Shot 2017-06-24 at 09.25.34

Step 3:

When you are already on your Startup Disk, select theScreen Shot 2017-06-24 at 09.31.12.png following to make changes. When you click on this, a verification will pop up asking you to put your password of your computer. Put your password and click Unlock.Screen Shot 2017-06-24 at 09.33.08.png

 

 

 

 

Step 4:

When you are able to make changes, select the system and press Restart.

Screen Shot 2017-06-24 at 09.35.25.png

First, Select your system.

 

 

 

Screen Shot 2017-06-24 at 09.36.29.png
Then, select Restart.

 

Step 5:

After your computer restarts, you will be asked to sign in to your apple id. And, Tada!

Yours truly,

L.O.A.S.H

Python Project: GuEsS tHe NuMbEr

For this, you could download the python from here https://www.python.org/downloads.

You could copy the program below and add some more!




“””A game””””””A game”””
from random import randintfrom time import sleep
def get_user_guess():    user_guess = int(raw_input(“Guess a number: “))    return user_guess
def roll_dice(number_of_sides):    first_roll = randint(1, number_of_sides)    second_roll = randint(1, number_of_sides)    max_value = number_of_sides * 2    print “The maximum possible value is: ” + str(max_value)    sleep(1)    user_guess = get_user_guess()    if user_guess > max_value:        print “No guessinc higher than the maximum possible value!”        return    else:        print “Rolling…”    sleep(2)    print “The first value is: %d” % first_roll    print “The second value is: %d” % second_roll    sleep(1)    total_roll = first_roll + second_roll    if user_guess > total_roll:    print “You won!”    return    else:    print “You lost, try again.”    return    roll_dice(6)




 

With this program, you will be playing a game where you will think of a number and then the computer will randomly generate two numbers and add them together. If your number that you’ve guessed is higher than the two numbers added together than you win! But if it’s less than you lose.

Yours truly,

L.O.A.S.H

JQuery Project | To – Do List: …

Hey, again! Here’s another of my jquery projects but this time we will be making our very own list where we could star, delete and add!

Below is the index.html code:

Screen Shot 2017-06-17 at 21.19.31

Screen Shot 2017-06-17 at 21.19.42Screen Shot 2017-06-17 at 21.19.50

Next, is the style.css code:

Screen Shot 2017-06-17 at 21.21.36Screen Shot 2017-06-17 at 21.32.08Screen Shot 2017-06-17 at 21.32.26Screen Shot 2017-06-17 at 21.32.37Screen Shot 2017-06-17 at 21.32.45

Last but not least, add the following code for your script.js file:

Screen Shot 2017-06-17 at 21.34.35Screen Shot 2017-06-17 at 21.34.47

When you finish with this awesome project, your output should look similar to this:

Screen Shot 2017-06-17 at 21.36.38.png

Thank you!

Yours truly,

L.O.A.S.H

JQuery Projects | Essentials for a Login Page

In this Project, you will be making a login page. I’ve even added in some code so that if you fail to fill in one of the blanks, make the password less than 8 characters or don’t properly write an email with @gmail.com or @yahoo.com at the end, an error would pop up! 

Now, this is interesting :D.

For this, you will need one folder containing three files preferably made with Sublime text, like me. 

The first file will be named index.html and you will put the following code:



Screen Shot 2017-06-13 at 14.49.47

Screen Shot 2017-06-13 at 14.49.58

Screen Shot 2017-06-13 at 14.51.13



 

The second file will be named style.css and the code I wrote is the following:



html, body {
margin: 0;
padding: 0;
font-family: ‘Montserrat’, sans-serif; }

body {  

background-image: url();

background-size: cover;
background-repeat: no-repeat;
background-color: #140e07;
color: #fff; }

.container {
max-width: 940px; }

/* Header */
.header {
text-align: center;
margin-bottom: 50px; }

.header .container {
padding: 30px 0;
border-bottom: 1px solid #e5e5e5; }

/* Main */
.main {
margin: 80px 0; }

.main h1 {
font-size: 30px;
margin: 0 0 20px 0; }

/* Form */
form input.form-control {
border: 0px;
border-radius: 0px; }

.main .btn {
margin-top: 30px;
color: #fff;
background: rgba(0,240,190,0.25);
border: 0px;
border-radius: 0px; }

.first-name-error,
.last-name-error,
.email-error,
.password-error {
color: #dd4b39;
font-weight: 600; }

/* Footer */
.footer .container {
padding: 20px 0;
border-top: 1px solid #e5e5e5; }

.footer ul {
list-style: none;
padding: 0 20px;
margin-bottom: 80px; }

.footer li {
display: inline;
margin-right: 20px; }



 

Lastly, on your third file, name it app.js and copy the following code:



var main = function() {
$(‘form’).submit(function() {
var firstName = $(‘#first’).val();
var lastName = $(‘#last’).val();
var email = $(‘#email’).val();
var password = $(‘#password’).val();

if (firstName === “”) {
$(“.first-name-error”).text(“Please enter your first name”)}

else {
$(“.first-name-error”).text(“”)}

if (lastName === “”) {
$(“.last-name-error”).text(“Please enter your last name”)
} else {
$(“.last-name-error”).text(“”)}

if (email === “”) {
$(“.email-error”).text(“Please enter your email address”)
} else if (email === “test@example.com”) {
$(“.email-error”).text(“This email is already taken.”)
} else {
$(“.email-error”).text(“”)}

if (password === “”) {
$(“.password-error”).text(“Please enter your password”)
} else if (password.length < 8) {
$(“.password-error”).text(“Short passwords are easy to guess. Try one with at least 8 characters.”)
} else {
$(“.password-error”).text(“”)}

return false;
});

}

$(document).ready(main);



 

After saving this, try out your project! It should look something like this….

Screen Shot 2017-06-13 at 14.52.38

This is how an error would look like…

Screen Shot 2017-06-13 at 14.53.29

Yours truly,

L.O.A.S.H

JQuery Projects | DIY Meme

Well, the title says it allll. The project I’m about to present to you will give you the power to create…. Memes!!! 

Let’s begin…

Make your folder in which you will be placing all the HTML, CSS and others. Are you done? 

When you finish, make 3 different files. Name one of the files: index.html, style.css, and app.js. I’m using Sublime Text for this. 

On the index.html file, you can copy the code below:

Screen Shot 2017-06-12 at 23.58.33.png

Screen Shot 2017-06-12 at 23.58.45.png

Screen Shot 2017-06-12 at 23.58.52.png

Notice the numbering to prevent confusion.

For the style.css file, copy the following:




html, body {
margin: 0;
padding: 0;
font-family: “Open Sans”, sans-serif;
}

.header {
background: #ffe780;
margin-bottom: 40px;
padding: 10px 0;
}

.header img {
width: 90px;
margin: -10px 10px 0 0;
}

.header h1 {
margin: 0;
display: inline-block;
}

.meme {
position: relative;
}

.top-caption,
.bottom-caption {
font-family: Impact, sans-serif;
color: #fff;
text-shadow: #000 0px 0px 6px;
text-transform: uppercase;
text-align: center;
font-size: 50px;
}

.top-caption {
top: 10px;
left: 0;
right: 0;
margin: 0 auto;
position: absolute;
}

.bottom-caption {
bottom: 10px;
left: 0;
right: 0;
margin: 0 auto;
position: absolute;
}

.tool h2 {
margin-top: 0;
margin-bottom: 20px;
font-size: 25px;
}

.tool form label {
margin-bottom: 10px;

}

.tool input {
border-radius: 0;
border: 0;
border-bottom: 5px solid #ff7171;
box-shadow: none;
}

input[type=”text”]:focus {
border: 0;
border-bottom: 5px solid #ff7171;
outline: 0;
box-shadow: none;
}

 




 

Lastly, for the app.js file, copy the following code:




var main = function() {

$(‘#top-text’).keyup(function() {
var top = $(this).val();
$(‘.top-caption’).text(top);
});

$(‘#bottom-text’).keyup(function() {
var bottom = $(this).val();
$(‘.bottom-caption’).text(bottom);
});

$(‘#image-url’).keyup(function() {
var image = $(this).val();
$(‘#meme’).attr(‘src’, image);
});

};

$(document).ready(main);

 




 

Now, save your project. Open your folder which you’ve placed all these files and double click on the HTML file. This will open up and you will get something like this…..

Screen Shot 2017-06-11 at 19.26.57

If you will notice, there is this (cute) dog(gie) up there on the screenshot with some text. What you have to do is search for a photo that you want, right click to copy photo address and paste it on the Image Url. Add some text. Experiment! Try changing the colors in the style.css to change colours and placing!

Yours truly,

L.O.A.S.H 

L.O.A.S.H’s Guide to (nearly) Everything: How to Assemble a CPU Computer

Haiii, again!! Welcome to another L.O.A.S.H Guide. Together we can do this! Also, advance sorry for the poor pictures and handwriting (I was in a hurry ;D). In this particular episode, I’m going to introduce a step -by- step guide on how to assemble your own Vertical CPU Computer.

Let us begin.

For this procedure, you will be needing the following materials:

  • CPU Tower (which is technically just the case)
  • Power Supply 

power_supply

  • Video Cord

video_cord.jpg

  • Harddisks 

harddisks.jpg

  • Fans (CPU and exhaust)

fans.jpg

  • SATA Wire

SATA_wire.jpg

  • CPU Intel

DT_Haswell_i7_FB_678x452.jpg

  • Memory or Ram (DDR – III (3))

memory_ram.jpg

  • Port Slot

port_slot.jpg

  • Motherboard and Processor

Motherboard_and_processor.jpg

When you’ve gathered your materials we can head on to the action. The procedure is the following:

STEP 1:

The first thing that I did was to screw on the exhaust fan. This will help when it starts to get hot inside the CPU. You will screw the fan to the opposite side of the power button of the CPU. The area in which you will be placing this fan is inside and on this mesh looking surface.

This slideshow requires JavaScript.

STEP 2:

Time to place the Motherboard. Be careful in this step as the motherboard is kind of sensitive. The side of the motherboard should sort of stick out on the side where the exhaust fan is. This side contains like the usb port and others. Then when you feel the position is correct, screw the four sides.

20170508_104742.jpg

STEP 3:

Get your Power Supply and place it beside the mother board. You will see a big vacant rectangle space which you could refer to the picture. You could also move the wires from the power supply to the side (just for now) to keep it from blocking your view, we will deal with it later.

STEP 4:

Attach the CPU to the motherboard. Unfortunately, I do not have any pictures to show as the the mother board I had already had a fixed CPU on it. But you can check the guide on INTEL on how to install the CPU Intell, the first seven steps show you how.

STEP 5:

In this step, you will be installing the CPU Fan. This will be going on top of the CPU that you have just installed. If you look closely at the area of where you will be placing the fan, there are two handles where you could hook the fan. Make sure that this fan is stable by trying to move it around a bit.

20170508_105418.jpg

STEP 6: 

For this step, you will be putting in your video card. If you look on the side of the video card, you will notice there is this place where to connect the display devices. You will have to slide this in with the mother board connection facing down. With reference from the pictures below, you will see that you need to slide it down to the one of the available port slots next to the connecting line on the mother board. I circled the location of where you will be connecting the video card to the motherboard in red at the photo slide below.

This slideshow requires JavaScript.

STEP 7:

You will have to pay close attention here because if you don’t do the wiring properly, the motherboard can fry. 

You will also be needing to look at the photos below for reference which will make it easier for you to understand. So there are 6 wires which are paired in twos. The three have the following labels on it:  H.D.D Led, Power SW and Reset SW. 

Now look at your mother board, specifically beside the video cord you placed you will see these small metal lines beside the word SPKR on the mother board. The wire colour order you will be following is: R(ed) W(hite) O(range) W(hite) W(hite) B(lue). Reference again is down below at the picture slide. The white and blue wires will be going in front of the R W O W, it (W & B) will be a row in front.

This slideshow requires JavaScript.

STEP 8:

More wiring here, guys. 

This time, the wiring will be for the power supply. Hold up the wires for the power supply and first get the Main Power Connector. This is the longest connector you’ll see among the other wires. Also, there is a small connector which you will need to combine to the bigger connector. Now, from the guide from my pictures you will notice where you will be needing to place this connector.

This slideshow requires JavaScript.

STEP 9:

We are so closeeeeeee!! 

Okay, so here we will be installing the hard drives. I have two because the other one is a backup hard drive. Just for your information, the back up hard drive is 500GB while the other main hard drive is only 250GB. I would recommend to have a back up hard drive but if you don’t have any right now, it is okay. 

This slideshow requires JavaScript.

Anyways, to install the hard drive, first things first is to screw it in it’s rightful place. If you are looking at everything

Inside-your-PC-tower3.png
I borrowed this picture but I encircled the area in which I would recommend to place the main hard drive.

from above, you will notice that there is this compartment for hard drives. Try putting the main hard drive on the very left side (closer to the mother board) while keeping the back up hard drive on the very right side. Make sure that you screw on the main hard drive properly and that it is not sticking beside the back up hard drive because it could cause malfunctioning.

STEP 10:

This time, we will be placing in the memory or ram. Just a precaution before doing this step, the RAM is very sensitive so take extra caution when handling it.

Screen Shot 2017-05-09 at 9.15.54 PM.png If you look at this picture, you will notice that the area to connect the Memory to the Mother board is already named, RAM. All you have to do is place it properly into the connection area (which is the same place called RAM in the picture). Make sure that it properly fits in before you push it in slightly hard. You will know that it is in when you hear a click and it is locked in. The sides will automatically lock in the RAM once pushed with a good amount of force. When you are finished putting in both of the RAM, you have completed step 10.

This slideshow requires JavaScript.

Take a 5 minute break if you have to 🙂

STEP 11:

I’d say this is probably one of the easiest steps. 

This slideshow requires JavaScript.

Get you SATA wire and connect one end to the main hard drive and the other end to the SATA1 on the mother board. This will be like playing eye spy on the mother board. And, that’s all!

STEP 12:

Hey, remember one of our first steps was screwing in the exhaust fan? Well, you will need to plug it in somewhere to make it function so now is the time to do that. Get the wire connected to the fan and connect it to the CHA1_FAN labelled on the motherboard.

20170508_112454.jpg

In this step, you will also need to plug in the speaker. This is a simple task. Just attach it to the mother board. This is a row in front of the colour coded wiring we did at step 7.

unnamed-1.jpgunnamed.jpg

STEP 13: 

Screw in the port slot to seal and mobilise the video card. 

 

20 more steps to go! Just kidding XD. WE ARE DONEEEE!!! I hope you got to follow through the steps and procedure. If you have any questions or if you are confused with some of the steps please just comment down below!

Yours truly,

L.O.A.S.H

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

L.O.A.S.H’s Guide to (nearly) everything: Lights Everywhere Ft. Arduino

screen-shot-2016-11-22-at-4-04-58-pm

Level of hardness: easy

Woop Woop! *dances* Yet another Arduino project…. YAY! Soooo excited!!

Okay, serious game face now.

… heh

Well, since I’m done confusing you with my dance moves and shouting of joy, now it’s time to do a simple Arduino project for lights.

What you will be needing are (cool):

  • 1x Arduino
  • 1x Breadboard
  • 1x USB Cable Type A/B
  • 1x Button
  • 1x 10k-Ohm Resistor
  • 3x 220 Ohm Resistor
  • 3x LED (A.K.A light-emitting diode, A.K.A miniature light bulb-ish)
  • 6x Jumper Wires

Once you’ve gathered all your materials, let’s begin.

Before we start, a few things to keep in mind:

In the LED:

The longer leg === Anode (+)

The shorter leg === Cathode (-)

For the resistors:

They are here to help. How does it do this? Its job is reducing the electrical flows, adjust signal levels and much more. It helps in making the sound of a buzzer less cranky (or annoying). If you don’t have one, your circuit will still work but your LED will become hotter at times.

Step 1: LET’S. DO. THIS.

Let’s start with the basics, and what I want you to do is place all your LED’s on your breadboard, first. If you want to copy exactly the photo above then you should copy this format:

1st LED:

In my case, this is the red one.

Cathode (-, shorter side) —> E6 (on the breadboard)

Anode (+, longer side) —> E7

2nd LED:

Cathode (-) —> E11

Anode (+) —> E12

3rd LED:

Last but not least…

Cathode (-) —> E15

Anode (+) —> E16

Hope you got that. Hey! These letters and number kinda remind me of chess. Hehheh. BTW, you could put you LEDs in your choice….

Step 2: I Can’t Resist(ors) Youuu

Cheesy.

Let’s add in our resistors and this step is very simple. Just grab your 220 Ohm resistors and place them each on the each of the LED Anode’s lane. So, right in front of the leg. Follow? Well, specifics are:

Screen Shot 2017-03-11 at 19.34.10

If you look at the picture above (which you really should), the redder side of the 220-ohm resistor leg is in the lane of the LED. So, you will just have to put the redder side of your resistor in the same lane of the anode (+, longer side) of the LEDs. Place the other leg of the resistor on the GND lane, which is the lane with the – on the top. Do this with all the LEDs.

1st 220-ohm resistor

Redder side: b7

1st 220-ohm resistor

Redder side: b12

1st 220-ohm resistor

Redder side: b16

Once you are done with that, you will also have to put your 10k-Ohm resistor on b24.

Easy? Hope so. We are half way, guys! Don’t stop now. ^_^

Step 3: Don’t Press the Button

Time to add your button! All you have to do is place it in front of your 10k-Ohm resistor. Just make sure that they are in the same lane, kay?

Step 4: Let’s Connect Everything

Hope step 3 didn’t give you much of a headache.

All you will be using here are you jumper wires. Since we will be using six wires, let’s start putting them into our breadboard and Arduino.

1st Jumper Wire:

One side should be on the top of the positive lane on the breadboard and the other side of this Screen Shot 2017-03-13 at 21.58.20.pngwire should be connected to the 5v on the Arduino.

2nd Jumper Wire:

One side should be on the negative lane of the breadboard while the other side of the wire shouldScreen Shot 2017-03-13 at 21.58.25.png be placed into the GND (ground) on the Arduino.

3rd, 4rth, 5th Jumper Wire:

Each should be connected to the cathode (-, shorter side) of the Arduino. Now, look up at the picture for reference, you’ll need it. For the first LED, the red one, connect the other end of the wire to the -5 on the Arduino. For the second LED, the blue one, connect the other end of the wire to the 4 on the Arduino. Connect the last jumper wire for the third LED to the -3 on the Arduino.

6th wire…. the last one:

Just connect one of the sides of the jumper wire to one of vacant legs of the switch, most likely just beside the resistor, and connect the other side of the wire to the number 2 on the Arduino.

Check the photo above if you need any reference.

YAY.

Finally, you’ve come to the end of the project. BTW, this is called the Spaceship Interface. Yup. You’ve probably glanced up at the photo a few times to find the Spaceship there. Truth is, I lost the cardboard cover that had a spaceship on it.

Anyways, hope you enjoyed! And, hope you got to make your project work! All you have to do left is plug it to your computer and write your code to light it up!

Your truly,

L.O.A.S.H

L.O.A.S.H’s guide to (nearly) Everything: How to make an Intruder Alarm with Arduino

INCLUDES LOTSA PICTURES!

Before we begin, you will have to download the Arduino on your computer if you haven’t already. In order to program your Arduino to work, you will need the Arduino program installed. I downloaded mine at https://www.arduino.cc/en/main/software.

It’s time to learn how to make your own Intruder Alarm with your Arduino!!! If you don’t have an Arduino I just have to tell you that it will be a great investment.

All you will be needing are the following:

  • Arduino Board
  • Jumper Wires (13x)
  • Bread Board
  • 10k Ohm Resisters
  • LEDs (recommended different colors!!! :D)
  • Buzzer or Piezo
  • Ultrasonic Sensor (HC-SRO4)

You could check the cartoonish photo that I’ve screenshotted from Instructables for reference down below………

Screen Shot 2017-02-26 at 18.18.29.png

On the top right, you will see this medium sized piece of machine that kind of look like speakers. Heh, they’re like baby speakers, how cute ^___^.

LEGOOOOOO STARTTTT!!!!

Step 1:

After gathering all your materials, take two of your jumper wires, which are preferably black and red. Connect one of the sides of the red jumper wire (remember, the jumper wire will do the same thing even if the jumper wire is a different color) to the 5v(olts) in your Arduino board and the other side of the jumper wire to Positive lane on the breadboard. Now, get your black wire and connect one end to the GND (ground) and the other end to one of the holes in the negative lane of the breadboard. This will be a very simple step as the GND and 5v are right next to each other. If you look at the top photo above, you will see which will be the proper places to put your positive and negative wires.wp-1488164286136.jpg

wp-1488164241036.jpg

Step 2:

Let’s just do the simple steps, first, and I want you to start placing your LEDs in a row. In case you are a n00b (newbie or beginner) in all these wires and blah, LEDs stands for a light emitting diode. If you don’t want to know more about the cool components that LED holds and the important things you should know then skip to the next paragraph. Anyways, a LED or a light emitting diode is pretty much a miniature bulb encased by an epoxy case connected to two metal wires called the cathode and the anode. Once you get deeper and deeper into Arduino, it is of great importance to know the difference between cathode and anode. Let’s learn a little something. If you look at your LED, you might notice that one of the legs are longer than the other (weird?), well, the longer leg is the anode (+) and the shorter leg, you might have guessed, is the cathode (-). When you are placing your LED, the longer leg (or the anode) should be connected to to the jumper wire and the shorter leg (aka the cathode) should be connected to the resistor. If you don’t understand it completely, you will in due time.

wp-1488171508335.jpg

You should get around 6 light bulbs and place them in a row. Look at the top photo for reference. You will not need to have that super long breadboard to complete this project by the way. As long as you connect all the wires to where they are supposed to be, like the wire to the anode and the resistor to the cathode then things should turn out fine.

Cause what you need to understand is how things are connected to the breadboard. Once you get the concept, then everything will be much simpler.

wp-1488171497147.jpg
The right leg here is the longer side.

Step 3:

This step will be a bit tedious but will be worth the work later. So for your reference, you can check this photo and the other following pictures:Screen Shot 2017-02-26 at 19.47.49.pngPlease understand that as long as the jumper wire is on the same row that the legs of the bulbs are on, then they are connected. What you will need to do is connect your jumper wires and your resistors. Check the photo above for reference because I’m a n00b at explaining. To get more specific, we should do the following positions:

To get more specific, we should do the following positions:

What you will need to do is try to follow the photo above by the positioning.

(This will be from LED right to left. Meaning when you see the word LED 1,  this is the LED at the very right, just like in the photo.)

Screen Shot 2017-02-27 at 13.07.04.png

You will have to connect one of the ends of the jumper wire (any color) to the front of the anode or longer side of the legs of the LED and the other end to the Arduino. Down below I will be giving you guys which LED will you be connecting to which pin on the Arduino with the jumper wires. Just please refer to the photos if you don’t understand a word I’m saying because I really want you guys to make one of these!!! You will also have to be aware that the anode of the LED should be on the right side.

Screen Shot 2017-02-26 at 19.47.49.png

These are for the jumper wires…..

LED 1 —> pin 8 (these pins are on the Arduino Board)

LED 2 —> pin 9

LED 3 —> pin 10

LED 4 —> pin 11

LED 5 —> pin 12

LED 6 —> pin 13

wp-1488172921771.png
THIS IS THE RESISTOR THAT I USED

Now, for the resistors, you will also notice that this has two legs. If your resistor has one leg then there’s something wrong. So, take one of the legs of your resistor and place it in the same row of the LEDs cathode then put the remaining leg into the negative lane of the breadboard. Do this step for each of the LEDs until you’ve completed it. Make sure the reddish part of the resistor is facing the LEDs…..

wp-1488173198073.jpg
See, the red part of the resistor is facing the LED. NOTICE: The jumper wires are on the anodes (longer side) while the resistors are on the cathodes (shorter side)

This step might be a bit messy….. just a warning.

Step 4:

Unfortunately, with the rush of excitement to show you guys something new and because of the excitement to achieve something new, I’ve forgotten to put in my Piezo or the buzzer.

If you want to add in your buzzer, you should make sure that you connect the longer leg (just like for the LED, the same way) of the buzzer to pin 3 on the Arduino with a jumper wire. And, connect the shorter leg of the buzzer to GND. To put connect the shorter leg of the buzzer to the GND, just make it on the same lane as the negative lane on the breadboard. After all, we did connect that to the GND at the start.

Step 5:

Place your Ultrasonic Sensor on the top right. For this step, you will have to grab 4 jumper wires. If you look closely at the Sensor, you will notice that it has 4 words: GND, ECHO, VCC, TRIG. For each word, connect a jumper wire.

wp-1488174874270.png

Connections….

GND (on the sensor) —> GND (on the negative lane of the breadboard (A.K.A ground, too!)

Echo (on the sensor) —> pin 6 (on the Arduino board)

Trig (on the sensor) —> pin 7 (on the Arduino board)

Vcc (on the sensor) —> To the positive lane of the breadboard (A.K.A 5V(olts))

Your outcome should look somewhat like this:

 

wp-1488175292242.jpg
Don’t mind the messy background. If you look closely at the contraption that I’ve made, you will notice how and where I have placed my jumper wires for the sensor.

 

Step 6:

Screen Shot 2017-02-27 at 14.17.53.png

 

Finally, just plug in your Arduino device and run your code to program it. If you get this annoying error message from Arduino saying: ” Avrdude: no programmer has been specified on the command line or the config file         Specify a programmer using the -c option and try again”. Then, all you have to do is, go to tools, then in tools go to boards and in boards click on boards manager.

So…

Tools < Boards < Boards Manager.

When you open you board manager, update your Arduino Avr Board.

Yours truly,

L.O.A.S.H