UNV-birthday-code - LAB FOR BIRTHDAY CODE PDF

Title UNV-birthday-code - LAB FOR BIRTHDAY CODE
Author Aaron Laparejo
Course Topics in Undergraduate Mathematics
Institution University of Hawaii at Manoa
Pages 7
File Size 182.3 KB
File Type PDF
Total Downloads 64
Total Views 153

Summary

LAB FOR BIRTHDAY CODE
...


Description

UNV-112 Engineering Lab Report Format Abstract

I.

Objectives and Introduction

The purpose of this activity is to build a simple circuit like a traditional flashlight to create a certain LED light to flash on and off using Arduino and/or Tinker cad to create a code with using UNV-112 kit. We were given a problem that involves creating a flashlight, being able to create a code using Arduino, and being able to use Thinker CAD to have a design of how the circuit will look like and being ab,e to create a code which certain LED light will be turn on of off. A circuit is a closed path that electricity to flow from one point to another. Coding is process of translating and writing codes from one language to another which is binary.

II.

Theory and Background Information

The Key concepts involves with breadboard to have the power to light up the LED, and also the coding because you want a certain LED lights to turn on or off. I used my knowledge of creating a circuit on Thinker CAD. I used my knowledge from what I learned in class for creating codes and had a better understanding on using codes when I was learning codes on the Arduino website but I had a difficult time on uploading my codes on Arduino to my UNO board. I learned that my coding were correct on Arduino because I verified my coding on Arduino and my coding on Tinker CAD it worked perfectly. On Tinker CAD it should certain LED lights turn which were correct then I had a problem of uploading my board.

III.

Design and Calculation

The told we needed to make a circuit and creating codes for this lab is 4 2k resistors, 4 LED lights, 9 jumper wires (4 red, 5 black), 1 breadboard, 1 Uno board, and one USB cable. After creating a workable design of the ciruit and coding on Tinker CAD then needed to verify the coding is correct on Arduino then when the code is clear of any errors. Finally, needed to apply hands-on and weather your coding are correct then it should light a certain LED light on.

Tinker CAD prototype 1

int led_red = 0; // the red LED is connected to Pin 0 of the Arduino

int led_red = 1; // the yellow LED is connected to Pin 1 of the Arduino

int led_red = 2; // the green LED is connected to Pin 2 of the Arduino

int led_red = 3; // the blue LED is connected to Pin 3 of the Arduino

void setup() {

// set up all the LEDs as OUTPUT

pinMode(led_red, OUTPUT);

pinMode(led_red, OUTPUT);

pinMode(led_red, OUTPUT);

pinMode(led_red, OUTPUT);

}

void loop() {

// turn the red LED on and the other LEDs off

digitalWrite(led_red, LOW);

digitalWrite(led_red, LOW);

digitalWrite(led_red, LOW);

digitalWrite(led_red, HIGH);

delay(1000); // wait 1 second

// turn the yellow LED on and the other LEDs off

digitalWrite(led_red, HIGH);

digitalWrite(led_yellow, LOW);

digitalWrite(led_green, LOW);

digitalWrite(led_blue, HIGH);

delay(1000); // wait 1 second

// turn the green LED on and the other LEDs off

digitalWrite(led_red, HIGH);

digitalWrite(led_yellow, LOW);

digitalWrite(led_green, LOW);

digitalWrite(led_blue, LOW);

delay(1000); // wait 1 second

// turn the blue LED on and the other LEDs off

digitalWrite(led_red, LOW);

digitalWrite(led_yellow, LOW);

digitalWrite(led_green, LOW);

digitalWrite(led_blue, HIGH);

delay(1000); // wait 1 second

// turn the white LED on and the other LEDs off

digitalWrite(led_red, HIGH);

digitalWrite(led_yellow, LOW);

digitalWrite(led_green, LOW);

digitalWrite(led_blue, HIGH);

delay(1000); // wait 1 second

// turn the orange LED on and the other LEDs off

digitalWrite(led_red, HIGH);

digitalWrite(led_yellow, LOW);

digitalWrite(led_green, LOW);

digitalWrite(led_blue, LOW);

delay(1000); // wait 1 second } Tinker CAD prototype 1 (CODING) I successfully created one prototype to turn on LED lights using 3 sections to have 3 types on LED lights to turn on. On the first sections LED light number 4 will turn , then the next section LED light numbers ! and 4 will turn on and finally LED light number 1 will turn on. Then I repeated the process.

IV.

Simulation

I created my simulations in Tinker CAD and also on Arduino. I used Tinker Cad to my design of my protype and also created the coding on Tinker CAD then verified it on Arduino if I had any errors. Then I did so I went back to correct it and solved problem of my coding. Then my LED light on Thinker Cad were working just the way I wanted it to be.

V.

Verification of Requirements and Performance Testing

I used my knowledges from the previous labs to create my prototype on Tinker CAD. At first I built a circuit and creating a code for make a certain LED light to turn on or off. I successfully turned on certain LED light on TinkerCAD but was unable to successfully processed to my UNO board. My there

was an error on my board or an update that I have not updated because everything looks good wit my circuit and also my code.

Prototype one (lights turned on and off)

VI.

Conclusion and Summary

This purpose of this lab is to create a flashlight and able to create a successful coding. I believe I made an efficient circuit and a efficient code that could turn a certain LED light on and off. Through Thinker CAD, I was able to learn how to properly use binary codes. I created one prototype in Tinker Cad then built it hands-on and my prototype had a problem processing it through the Uno board. The only thing I would change is asking for help on processing my binary code to my Uno board....


Similar Free PDFs