Skip to content

f0bs/IDD_Lab1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Designing Interactive Devices Lab1: Make it blink!

Lab report for the IDD lab 1 by Fabio Daiber

Part A: Setting up the board

alt text

Part B: Manually Blink an LED

a. What color stripes are on a 270 Ohm resistor?

• Red for 2 as 1st value • Violet for 7 and 2nd value • Black for 0 as 3rd value • Black for 1 as multiplier • Brown for -2% tolerance

b. What do you have to do to light your LED?

I have to press the button to complete the circuit.

alt text

Part C. Blinking an LED using Arduino

Blink the on-board LED

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

I needed to change the parameter digitalWrite(LED_BUILTIN, HIGH) to HIGH.

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

I change the rate of blinking by chaning the value of delay

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

We want to add a resistor to protect it from frying.

d. Change the delay parameter to modify blink rate of your LED to make it blink faster. At what delay can you no longer perceive the LED blinking? (And how can you prove to yourself that it is, in fact, still blinking?

With a delay of 15ms I could barely still detect it flashing, with 10ms I can no longer detect it flashing. By taking a video, you can check if it is still flashing as the picture fps are not high enough.

Video proof

e. Modify the code to make your LED blink your way.

BlinkMyWay Code

2. Blink your LED

Blinking Video

Part D. Manually fade a LED

Manual fading video

a. Are you able to get the LED to glow the whole turning range of the potentiometer? Why or why not?

No, the LED turns off if the potentiometer is on the highest resistance because the resistance consumes all the current and the LED does not light up anymore.

Part E.

a. What do you have to modify to make the code control the circuit you've built on your breadboard?

I had to change the led variable to 11.

int led = 11;           // the PWM pin the LED is attached to

b. What is analogWrite()? How is that different than digitalWrite()?

The analogWrite allows us to control the brightness of the LED by toggling the LED on and off in a range from 255 to 0 so fast that it looks like the LED is fading. It lets us use the Arduino like a potentiometer whereas the digitalWrite only allows to turn it on or off (5v and 0V).

Part F. FRANKENLIGHT!!!

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

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

There has to be some kind of computation that determines how fast the mouse is moving and in what direction it is moving. So, it has to calculate the movement and translate it into the movement that we see on the screen.

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

There is a LED that emits light and a camera that take thousands of pictures to measure how far the mouse has moved. This information is then translated and sent via the USB cable to the computer. There is also a sensor that recognized physical feedback (clicking) as well as a sensor that recognized movement of the trackball.

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 via the USB cable form the computer. The mouse operates on 5V as well, so there does not seem to be any transformation.

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

I don't think that there is any information stored within the devide.

2. Using your schematic, figure out where a good point would be to hijack your device and implant an LED.

alt text

Implanted LED video

3. Build your light!

alt text

Franklight Video

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages