|
Explore TEAMS!
|
THS /
MicroAssignmentsNote on Q2 grading...
End of Quarter Tech Support Hotline 781-899-3081
Assignments for 2nd QuarterP#7: FINAL PROGRAMMING PROJECT! - Can you find the closest object in your field of view? <- Click on link for details
P#6: Sharp Sensor Analysis Lab <- Click on link for details
HW#4:
HW#3: Review streamlined sample code for P#2 and understand/explain what each line does. due 12/22
P#5: Hook up your photoresistor, flex sensor, distance sensor, and temperature sensor all at the same time and display all four values and the time once every second. Be sure to use a 10K resistor when using the resistive sensors. Then repeat your min-max experiment for each sensor and verify your predicted Arduino results from P#3.
P#4: Create a wait_for_start procedure
HW#2: Define (a) period (b) duty cycle and (c) frequency (math/physics/engineering concepts). What is the mathematical relationship between the three concepts? What units are used for each? Remember, A picture is worth a thousand words. Due Tues 12/8/09.
P#3: Explore max and min ranges for various analog sensors and write a one page summary of your results. Detailed description here.
P#2: When you push down and release the red push button, the LED on pin 13 "toggles" to the opposite state. On your LED display, display the state of the LED and the number of times the red button has been pushed.
P#1: Display "Hello, World" on your LCD display (play around a bit to see how the LCD display works). Then write a program that counts out "Hello, World" every pi seconds for a total of 10 times. Your LCD display should look something like this...
1. Hello, World!
Time = 3.14 s
2. Hello, World!
Time = 6.28 s
...and so on
HW#1: Write a program that makes your red push button switch control the LED on pin 13.
Assignments for 1st QuarterTemporary site for textbook: http://yunus.hacettepe.edu.tr/~yurdugul/3/C/c.pdf 1. Read and take notes on Chapter 1.1 to 1.4 2. Write a Hello World program that uses a loop to print out 10 enumerated instances of “Hello World” to your display (using a “for loop”). Your output should appear as follows: 1. Hello World
2. Hello World
3. Hello World
4. Hello World
5. Hello World
6. Hello World
7. Hello World
8. Hello World
9. Hello World
10. Goodbye World
3. Can you revise the program above to count down by tens starting at 100 rather than counting from 1 to 10? 4. Can you revise the program to say “Goodbye World” for the tenth line (see if you can do it with no more than two extra lines of code in your previous program). 5. Repeat #2 using if…then statements rather than a for loop. 6. Repeat #2 using a while loop rather than a for loop. 7. Write an efficient program that generates the following list: 1. Hello World
2. Goodbye World
3. Hello World
4. Goodbye World
5. Hello World
6. Goodbye World
7. Hello World
8. Goodbye World
9. Hello World
10. Goodbye World
No use of the the void loop() function after this point!Use only void setup() as your "void main()" function!8. Must Demo! Write a program that converts degrees Celsius to Fahrenheit in a mixed fraction format. The twist: you may only use integer type declarations! Think about the simple process you use for long division as you answer this problem. Your output should look like this… 12 degrees C equals 53 and 3/5 degrees F.
13 degrees C equals 55 and 2/5 degrees F.
.
.
.
Stop when you reach the maximum human internal body temperature.
9. Must Demo! Using only integer type variable, repeat program #8 using the following output format… (i.e., rounded decimal) 12 degrees C equals 53.6 degrees F. ->13 degrees C equals 55.4 degrees F. ->. .
.
Stop when you reach the maximum human internal body temperature.
10. Must Demo! Write a program that converts the following sequence of fractions into their decimal equivalents, rounded to the nearest thousandth. You may only use integer type variables for this problem. 1/2 = 0.500
1/3 = 0.333
1/4 = 0.250
1/5 = 0.200
1/6 = 0.167
.
.
.
1/20 = 0.050
11. Must Demo! Re-write program #8 using two functions called by your main program. These two functions are: int Celsius_to_Fahrenheit(int Celsius)
int remainder(int dividend; int divisor)
12. Write a program that determines exactly what number are returned for the following two function calls... random(50)
random(10,20)
You should loop this enough times to see all the possible numbers that come up, then make a conclusion about what the lowest and highest values should be. Then cut and paste the description for this function into a word document and revise the description to le the user know how the function REALLY works. Bonus: (+5 point on Q1 grade) Generate a list of "random" numbers between 1 and 50.
Stop generating the list as soon as all numbers have been generated at least once. |