Showing posts with label Done By Nelson Alino Jr. Show all posts
Showing posts with label Done By Nelson Alino Jr. Show all posts

Wednesday, December 2, 2015

Measuring the Light (Luminosity)

In this challenge we had to have to get a special chip that didn’t come in the Sunfounder kit, but we do have on hand. We then clicked this link http://adafru.it/d7d to install the AdaFruit Library. After that we had to unzip it, copy the Folder and then find the Arduino library on our hard drive and paste it into the Library Folder there. We also needed the Adafruit Sensor Library.When completed we downloaded the Adafruit_Sensor Library then copied and pasted the folder into our Aquino's library folder like you did above. When completed we restarted the Arduino IDE. Now we could run the File->Examples->Adafruit_TSL2561->sensorapi example program which read and calculate the lux readings for us. Lastly we took a look at the program. To see the readings Ruth and I had clicked on the little magnifying glass at the top of the Arduino window to open the Serial Monitor. We then used code
{  
 sensors_event_t event;
 tsl.getEvent(&event);
 if (event.light)
 {
   Serial.print(event.light); Serial.println(" lux");
 }
 else
 {
      Serial.println("Sensor overload");
 }
 delay(250);

}

This code was recursive and just keeps calling itself over and over
The last code being used was:
Serial.print(event.light);

which prints out the luminosity value.

Monday, November 30, 2015

Mixing Colors with RGB


For this project assignment we had to keep the same wiring as the last one, however we had to change the code. We then had to modify the following code to show 5 more colors. When we mixed the colors, turning on 2 or 3 lights at the same time we got other colors. We got more creative and decided to mix 5 different colors and show them each for 5 seconds, then show the next one.

In example if you turned off all the lights and then put



analogWrite(greenpin,255);
analogWrite(bluepin,255);


You would get Yellow. A mix of green and Blue. Let the light reflect off your hand and you should see the yellow light.


If you go to this site Colors  you will see how to mix colors
                                                                                                                   
                                                                                                                     
                                                                                                               

Counting with the 7 Segment Display

For this assignment we had to touch bases with the (SSD). A seven-segment display (SSD), or seven-segment indicator, is a form of electronic display device for displaying decimal numerals that is an alternative to the more complex dot-matrix displays. Seven-segment displays are widely used in digital clocks, electronic meters, and other electronic devices for displaying numerical information.

In summary for this a very assignment we had to;

Step 1 - Find out what A Seven Segment Display was.
Step 2 -  Gather the Parts & Tools to full-fill this assignment.
Step 3 - Once we placed the tool and parts on the given spots on the breadboard we began our                 Testing
Step 4 - The we had to try again to Built The Circuit.
Step 5 - Once built we began the One Digit Count Down Timer
Step 6 - Multiplexing
Step 7 -Finally we began the Two Digit Count Down Timer
Picture of What Is A Seven Segment Display?

Monday, November 23, 2015

Setting up the Seven Segment Display

For this assignment we interacted with the seven segment display which goes across the board, not parallel to the longer side. Now we are going to work on a Seven Segment display. This is a very complex and challenging project. It works just like our external LED program, except it has 7 LEDs all together in one small chip. We will be able to count and display letters with this chip. This program gave us an idea of how you would light up a calculator display.You can see the seven segments up above. We were not concerned with the DP (decimal point light), but if we were writing a calculator program we would have needed it. When you are inserting this chip in the breadboard, make sure you do not bend the pins! Have the decimal point facing your Arduino. By connecting to the different pins, we will be able to make different segments of our display go on. 

Steps Followed

  1. First connect GND on Arduino to the third row from the top of the seven segment display. Then connect one of the slots (in picture we used slot 13) the Arduino to a row on the breadboard above the seven segment display. 
  2. Then use a resistor to from that row to a row above or below the seven segment display.
  3. We then start by putting our 7 Segment display chip on to the breadboard. One of set pins can be in column C and the other in column G. You can put it in any row, but it’s better somewhere in the middle (see picture below). 
  4. The next thing we hadto do is connect a wire on the breadboard to a Ground (GRD) on the Arduino. The ground (black wire below) has to be in a row three from the top of the 7 Segment Display. So if the first row was 28 like it is below , then we have to put a ground in row 31.








Thursday, November 19, 2015

Controlling LED

In this project we learned to read analog voltages from the arduino. We will learn how to set the brightness of a LED  based on the position of the potentiometer. A potentiometer is an adjustable resistor which consists of a wiper that slides across a resistive strip to deliver an increase or decrease in resistance. The level of resistance will determine output of current to the circuit.
Potentiometer. We will be using the following schematic Working from the top row of the Potentiometer :Potentiometer to breadboard. Make sure you have the breadboard oriented the right way with the - sign facing out. 
Steps we followed:
Connect the LED on the other side of the board (shorter side - ground on top) Connect wire from 1st pin on top of Potentiometer to ground rail. Connect 2nd pin of Potentiometer (3rd row from top) to Analog port 0. Connect 3rd pin of Potentiometer (5th from top) to power rail (+). Then connect ground rail on this row to Ground on Arduino. Connect Power rail on Breadboard to 5V port on Arduino

Image result for Controlling LED with Potentiometer
Image result for Controlling LED with Potentiometer















Wednesday, November 18, 2015

Counting in Binary


For this next assignment we are now going to add a fourth LED and then we are going to count in binary

Binary numbers is Base 2 (our number system is Base 10)
As you can see the binary numbers starts with 0000 - all lights off
Then we will go to 1 -  0001 - the right most light will be on
Then we go to 2 - 0010 - the second light is on
Then we go to 3 - 0011 - the first and second light on the right will be on
Display each binary number for 2 seconds and then display the next one until you have all the numbers displayed up to 15

Tuesday, November 17, 2015

Programming Two LEDs

In this project assignment Ruth and I had to unplug our Arduino which was already plugged in. We had to keep our red LED plugged into pin 12 as well. Now we had to do the same thing and put an LED in another row . We are going to do the same thing in another row. Next we had to take one end of a red jumper wire and plug it into another pin  on the Arduino. We were then in-trusted to connect the other end of the jumper wire and plug it into a row in the first section of the board on the Arduino (not the first two column) on the left side of the breadboard. Now we had to take one end of a resistor and plug it into the same row and then over into the next section. Finally took the positive end of a green LED (the longer leg) and plug it into that row and then connect the other end of the LED to the ground rail on the right side of the breadboard. When fully completed we got to see the two LED lights beaming at us.

Monday, November 16, 2015

Keep a Light On

Here in Step 3 Ruth and I had to use a Bread board to keep on a light bulb. First we unplugged our Arduino that was already plugged in. We then took one end of a black jumper wire and plugged it into the GND slot on the right side of the Arduino. Any hole in the column worked. Next we connected the other end of the black jumper wire to the ground rail on the right-hand side of the breadboard (the ground rail is the last column under the minus sign). We had to take one end of a red jumper wire and plug it into a Pin on the Arduino. Any would work as well. Again we connected the other end of the jumper wire and plug it into a Column on a row on the breadboard. Any Column A to D worked. We left leave E open for the transistor. Then we took one end of a resistor and plug it into a column E in the same row on the left side of the breadboard. Once more we connected the other end of the resistor into Column F, same row on the right side of the breadboard. Again we had to take the positive end of a red LED (the longer leg) and plug it into the same row. Lastly we connected the other end of the LED (the shorter leg) to the ground rail on the right side of the breadboard. This was all completed and we were able to witness the light stay on.



Blink a Light

Today for Step 1 which was called Blink a Light Ruth and I had Plugged in one end of the USB cable into the USB port on the Arduino.
 We then took the other end of the USB cable and plug it into a USB port on your computer. Once we had done that we had to then open the Arduino IDE software program on our desktop.
      
When we entered the Arduino IDE software program on our desktop we clicked Tools → Board → Arduino UNO.
 We then were prompt to click Tools → Port → (Arduino UNO).
 As soon as that was completed we had to open and then click Arduino software - File - New - then copied and pasted the following code over what is on that screen.

This is the code we pasted
void setup() {
 // initialize digital pin 13 as an output.
 pinMode(13, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
 digitalWrite(13, HIGH);   // turn the LED on (HIGH is the voltage level)
 delay(1000);              // wait for a second
 digitalWrite(13, LOW);    // turn the LED off by making the voltage LOW
 delay(1000);              // wait for a second
}

It was then saved as - Blinker and we uploaded the code by File. Towards the end it was the most exciting part because we got to watch the yellow on-board LED next to port 13 blink on and off.





Displaying IMG_1870.JPG