Tuesday, March 10, 2015

Arduino Project 1 and 2

I was assigned to complete projects 1 and 2 in the Arduino Projects book . The 1st project consist of creating two circuits,which is a series circuit and a parallel circuit. The second circuit consisted of creating and programing a"spaceship interface"circuit. Lets get started!!!!! :)

The First project:creating a simple circuit 

Materials
List of materials

  • Two large jumper wires
  • 1 red LED
  • 1 breadboard
  • 1 pushbutton
  • 2 small jumper wires
  • 1 Arduino Board
  • 1 220 ohm resistor 


Step 1

Connect the Arduino board to the breadboard by using the two long jumper wires. connect  the ends of the two jumper wires on the 5v and GND panel on the Arduino ,while conecting  the other end towards the bus lines of the breadboard





Step 2

place a switch  across the center of the board in one direction. As you can see.....









step 3


Connect a 220-ohm sensor to connect power to one side of the switch










step 4

connect the other side of the switch by connecting the Red LED. As you can see, I used a wire to connect the the cathode  (short leg) of the LED to the ground.















Step 5
plug in the USB cable to the Arduino and you are set. Press the button and the Red LED should light up!!!!yay








Creating the Series Circuit 

Step1
Add another push button next to the one already connected on your breadboard. As you can see ,my push buttons are wired in a series that causes the led to light when both push buttons are pressed at the same time









Step 2
Connect the the anode of the Red LED to the second switch ,as well as connecting the RED LED cathode to the ground .Now let's test it out !!!!








step 3

As you can see ,when both push buttons are pressed at the same time ,the Red LED lights instead of one . The reason why that happens is because the same electrical current flows through both of the push buttons ,so they have to be pressed if you want the circuit to be completed,therefore causing the Red LED to light . Now let's create a parallel circuit !!!!! :)





Creating the Parallel circuit 

step 1

-It's crucial that you keep the push buttons and the
red LED where they are . Remove the connection the two push buttons and change the switch connections ,so you can get a parallel circuit.





step 2
As you can see , the Red Led lights when pressing one push button,but let's see if it works for the other push button?????




Would you look at that, it works!!!!! But why does this happen? Let me explain. Since the circuit is parallel , the electrical current is split between the two push buttons . Either push button you choose to press will light the red LED.















Project #2- creating and programming a"Spaceship interface"circuit

I was assigned to create and program a"spaceship interface" curcuit ,so let's get started . First let's create the circuit!!!!!!

materials


  • 1 breadboard
  • 1 Arduino Uno
  • 6 long jumper wires
  • 1 small jumper wire
  • 1 pushbutton
  • 2 red LED's and 1 green LED
  • 3 220 ohm resistors and 1 4.7 kilohm resistor





create the circuit

- place 4 long jumper wires on digital pins 2,3,4,and 5 on the Arduino Uno. Also place 2 long jumper wires on the ground and 5V pin on the Arduino uno .






- It's easier to place your resistors on your bread board first ,so that's what i did. place one side of your first 220 ohm resistor on the 8th negative power bus and the other on 7b. Place one side of your second 220 ohm resistor on the 12th negative power bus and the other on 11b. Place one side of your third 220 ohm resistor on the 16th negative power bus and the other on 15b. Place one side of your small jumper wire on the 23rd positive power bus  and the other on 22a. place one side of your 4.7 kilohm resistor on the 24th negative power bus and the other on 24b. 





once you have finished setting your resistors down, start 
connecting the jumper you placed on the arduino uno towards the breadboard. Place one jumper wire on 24c, 14a, 10a,and 6a. connect your ground jumper wire towards the negative power bus and connect your 5v jumper wire towards the positive power bus. 

























The final setup is to place your LED's on the bread board ,as well ass you r push button. So that's how you  create the circuit.




Here's the awesome circuit we created people yayyy. now lets get the code down.

















cracking the code 


As you can see i have typed down my code and if it works, you"ll see something cool.so let's plug it in!!!!!!!!!!

This is me recording what happens when the code is uploaded . you will notice that only the green LED lights up,but when you press the pushbutton the two red LED's will light up and the green LED would stop lighting up.!!!!!! coool !!!!

























As you can see, i have typed down the code. Once the code is proccesed by the arduino uno ,you'll something cool. So lets plug it in.










































No comments:

Post a Comment