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

  • Get control of your email attachments. Connect all your Gmail accounts and in less than 2 minutes, Dokkio will automatically organize your file attachments. You can also connect Dokkio to Drive, Dropbox, and Slack. Sign up for free.

View
 

Lab 2: Frankenlight LED

Page history last edited by Vivien Tsao 6 years, 11 months ago

Part B:

 

1) Blinking LEDs with Arduino Micro

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

         
No code needs to be changed for the onboard LED. The "digitalWrite()" function controls whether the light is on/off (HIGH/LOW).

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

 

          The "delay()" function tells the program to pause for a specified amount of time.  This is used to affect the rate of blinking.

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

          

          A resistor should be used to protect the board and an external LED.

2) Toggle LEDs on and off using Arduino Micro

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

 

          The ledPin constant needs to be changed to pin 9, not 13.

     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.

 

          You change the condition of the "if" statement.

 

          Code:

         

3) Fading LEDs on and off using Arduino Micro  

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

 

          None.  The example already has the LED using pin 9, which is what we have been using.

     b) How would you change the rate of fading?

 

          You can change the delay to affect how fast the for loops runs, thereby changing the speed at which the "fadeValue" changes.  You can also change the increment of the for loop to make the steps of "fadeValue" to be bigger or smaller to reach the end value of the for loop faster or slower.

     c) 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?

 

           *******

          

Part C:

 

1) Super bright LEDs

     a) What is the minimum resistor size that should be used with these LEDs?

 

          R_min = 60 Ohms

2) Take apart your electronic device, and draw a schematic of what is inside.

     Schematic:

         

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

     

          Remote: Yes, there is a microcontroller on the PCB that handles the button presses.

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

 

          Every button on the remote is a sensor.

     c) 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?

 

          The device is powered by two AA batteries.  There is some power regulation through the device with resistors and capacitors.  3V were measured throughout the device.

     d) Is information stored in your device? Where? How?

 

          Information is stored on the microcontroller memory.

Part D:

 

Schematics:

          

 

Video:

          

Comments (1)

Vivien Tsao said

at 12:55 am on Jul 15, 2013

Good job!

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