IFD:GrundlagenElektronik2011/5.Termin: Difference between revisions

From Medien Wiki
(Created page with "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 e...")
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
== 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.
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.


Line 7: Line 9:
=== Light dependent Resistor===
=== Light dependent Resistor===
http://fritzing.org/projects/photocell/ <br>
http://fritzing.org/projects/photocell/ <br>
Use the same sketch as before, but use an LDR instead the potentiometer.
Use the same sketch as before, but use an LDR instead of the potentiometer.
Let use the serial communication to see what values you receive, select different resistors and try again. Also measure the resistance of the LDR and compare to the resistors you used.
Use the serial monitor to see the values you receive, select different resistors and try again. <!--Also measure the resistance of the LDR and compare to the resistors you used.-->
 
 
== 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===
===Buttons and switches===
http://fritzing.org/projects/digital-input-button/ <br>
http://fritzing.org/projects/digital-input-button/ <br>
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.
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.)

Latest revision as of 20:06, 17 November 2011

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.)