IFD:GrundlagenElektronik2011/5.Termin

From Medien Wiki
< IFD:GrundlagenElektronik2011
Revision as of 20:06, 17 November 2011 by Mschied (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Homework

build these examples on your breadboard (and use the code examples provided in the links if you want.) Then try to create arduino sketches which do something different than the example sketches there.

LED + Potentiometer:

http://fritzing.org/projects/analog-inputoutput/
write an Arduino-Sketch which lets the LED blink in different speed, depending on the position of the potentiometer. Use the serial connection to monitor the values of the analog input.

Light dependent Resistor

http://fritzing.org/projects/photocell/
Use the same sketch as before, but use an LDR instead of the potentiometer. Use the serial monitor to see the values you receive, select different resistors and try again.


If you have still time left

we didn't introduce everything in class for these examples and you don't have a Servo yet, so I don't expect you to solve them - however if you want, feel free to do so.

Buttons and switches

http://fritzing.org/projects/digital-input-button/
turn the LED on when pressing the button. Then turn the LED off when the button is pressed again. Note: The button bounces - use the delay function to debounce the button.

Controlling a Servo

http://fritzing.org/projects/analog-input-to-servo/ Note: The blue servos provided in class may cause your arduino board to crash. Use a capacitor in parallel to the servo's GND and its 5V power line. Mind the polarity of the capacitor! (your capacitor has a white "minus" mark, this should go to GND.)