| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Stop wasting time looking for files and revisions. Connect your Gmail, DriveDropbox, and Slack accounts and in less than 2 minutes, Dokkio will automatically organize all your file attachments. Learn more and claim your free account.

View
 

Joshua Lee: Lab 2

Page history last edited by xinyi xie 6 years, 3 months ago

1a. What line(s) of code do you need to change to make the LED blink (like, at all)?

     Nothing

1b. What line(s) of code do you need to change to change the rate of blinking?

     The value of the delay method

1c. What circuit element would you want to add to protect the board and LED?

     A resistor

 

2a. Which lines do you need to modify to correspond with your button and LED pins? 

     Added lines to include pin 9 as an output with external LED and to blink when the button is pressed

b. Modify the code or the circuit so that the LED lights only while the button is depressed. Include your code in your lab write-up.

     Switched the values of digitalWrite so that when pin 2 reads high it outputs both pin 13 and 2 to low,

     else pin 13 and 9 are high

3a) Which line(s) of code do you need to modify to correspond with your LED pin?

     Nothing

3b) How would you change the rate of fading?

     Change the fadeValue 

3c) (Extra) Since the human eye doesn't see increases in brightness linearly and the diode brightness is also nonlinear with voltage, how could you change the code to make the light appear to fade linearly?

     set a higher max fade value or lower the fade rate

4a. What is the minimum resistor size that should be used with these LEDs? (Hint: think about your voltage supply and what the diode voltage drop means.) 

     5vdc, 30ma

     resistor needed 60ohms

5a. Is there computation in your device? Where is it? What do you think is happening inside the "computer?"

     No computation

5b. Are there sensors on your device? How do they work? How is the sensed information conveyed to other portions of the device?

     Button: sent to a wire terminal and sent to another part of the computer.

5c. How is the device powered? Is there any transformation or regulation of the power? How is that done? What voltages are used throughout the system?

     Powered by a wall outlet

     Transformed from AC-DC

     With a convertor in the computer

     never plugged in, couldn't check

5d. Is information stored in your device? Where? How?

     not on that particular part of the device

 

Comments (1)

xinyi xie said

at 9:49 pm on Jul 17, 2014

Good job.

You don't have permission to comment on this page.