Difference between revisions of "CSC231 Homework 7"

From dftwiki3
Jump to: navigation, search
(Problem #1: Arduino Project Schematics)
(Problem #2)
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
(c) --[[User:Thiebaut|DT]] 13:42, 30 October 2008 (UTC)
 
(c) --[[User:Thiebaut|DT]] 13:42, 30 October 2008 (UTC)
 +
 +
The deadline for this assignment is Wed. Nov 5th, at 11:59 p.m. plus 1 minute.
  
 
=Problem #1: Arduino Project Schematics=
 
=Problem #1: Arduino Project Schematics=
Line 8: Line 10:
  
 
You will have questions and I '''do not expect''' you to know electronics, so do stop by my office or make an appointment to review your diagram.  Once I am satisfied that your diagram is safe for the Arduino, you will have the go ahead (as soon as you get the parts) to wire it up and start concentrating on the programming side of the project.
 
You will have questions and I '''do not expect''' you to know electronics, so do stop by my office or make an appointment to review your diagram.  Once I am satisfied that your diagram is safe for the Arduino, you will have the go ahead (as soon as you get the parts) to wire it up and start concentrating on the programming side of the project.
 +
 +
Post your diagram to your Wiki before the deadline.
  
 
{| border="1" cellpadding="2"
 
{| border="1" cellpadding="2"
Line 41: Line 45:
 
[[Image:CSC231_Arduino_diagram1.jpg | 500 px]]
 
[[Image:CSC231_Arduino_diagram1.jpg | 500 px]]
 
|
 
|
Very fancy.  You don't need to be that fancy.  Although this is fancy, I find it lacking in information, for example the value of the potentiometers, and the impedance of the speaker.
+
Very fancy.  You don't need to be that fancy.  Although this looks sophisticated, I find it lacking in information, for example the value of the potentiometers, and the impedance of the speaker.  Also,  it is not easy to figure out what is connected to what.  Avoid visual sophistication if it results in poor information contents.
  
 +
|-
 +
|
 +
[[Image:CSC231_Arduino_diagram7.png | 500 px]]
 +
|
 +
This is taken from the [http://todbot.com/blog/spookyarduino/ Arduino Spooky] project page, which has good ideas for projects (including one on generating music).  This is a good example to emulate.  I would add labels on the diode and on the resistors!
 
|}
 
|}
  
 
=Problem #2=
 
=Problem #2=
  
Stay tuned...
+
Redo the Pascal Triangle program, where you will display 12 rows of the Pascal triangle, but this time make the program not display the 0s! 
 +
 
 +
Save your program in a file called hw7.asm and submit it as usual...
 +
 
 +
You can get one 1/2 point extra credit if you align the numbers in columns.
 +
 
 +
1
 +
1 1
 +
1 2 1
 +
1 3 3 1
 +
1 4 6 4 1
 +
1 5 10 10 5 1
 +
1 6 15 20 15 6 1
 +
1 7 21 35 35 21 7 1
 +
1 8 28 56 70 56 28 8 ...
 +
1 9 36 84 126 126 84 36 ...
 +
1 10 45 120 210 252 210 120 ...
 +
1 11 55 165 330 462 462 330 ...

Latest revision as of 08:54, 1 November 2008

(c) --DT 13:42, 30 October 2008 (UTC)

The deadline for this assignment is Wed. Nov 5th, at 11:59 p.m. plus 1 minute.

Problem #1: Arduino Project Schematics

I would like you to generate a diagram showing all the hardware parts you will be using for your project, and how they are connected to each other. This diagram should clearly show the Arduino board as a box with lines going in and out of it, with arrows indicating whether the signals are inputs or outputs, and the pin numbers. Resistors, switches and other parts should be clearly indicated, with their values and part numbers if you have them.

Below are several examples, some fancier than others. I have added comments to highlight what is good and what is missing. Use them as guidelines to generate your project diagram/schematics.

You will have questions and I do not expect you to know electronics, so do stop by my office or make an appointment to review your diagram. Once I am satisfied that your diagram is safe for the Arduino, you will have the go ahead (as soon as you get the parts) to wire it up and start concentrating on the programming side of the project.

Post your diagram to your Wiki before the deadline.

Diagram Comments

CSC231 Arduino diagram2.jpg

Very simple, but too crude. It doesn't have to be fancy, but I would recommend using MSWord or some drawing package to get something that is computer generated, and a bit more pleasing. The lower block should be labeled so that we have pin numbers, and its name and part number.

CSC231 Arduino diagram3.jpg

Neat. But the resistors should have values, the switches should be labeled (SW1, SW2, SW3), and the LED should be labeled as well (LED1). I would add arrows on the lines arriving at d13, d7, d5 and d3 to indicate which of them are outputs and which are inputs.

CSC231 Arduino diagram4.png

When diagrams are drawn by hand nicely, we have an effective diagram. Here the person didn't show the arduino, but showed the value of the resistors. I would prefer to see the connections to the Arduino. I would label the resistors (R1, R2, etc.). Note that this is a rare diagram where each pin is identified as an input or output.

CSC231 Arduino diagram5.jpg

Nice graphical representation showing also a state diagram. You can do the right-most diagram at some point, when you are programming. It's not needed now. Note that the Arduino is represented simply. Input/Output information is missing. Resistors should have labels and values. Note how simple the connection to the computer is shown, effectively and simply.

CSC231 Arduino diagram6.jpg

Another interesting diagram. Here the user uses boxes for everything, which is fine. But some important details are missing (resistors, etc.).

CSC231 Arduino diagram1.jpg

Very fancy. You don't need to be that fancy. Although this looks sophisticated, I find it lacking in information, for example the value of the potentiometers, and the impedance of the speaker. Also, it is not easy to figure out what is connected to what. Avoid visual sophistication if it results in poor information contents.

CSC231 Arduino diagram7.png

This is taken from the Arduino Spooky project page, which has good ideas for projects (including one on generating music). This is a good example to emulate. I would add labels on the diode and on the resistors!

Problem #2

Redo the Pascal Triangle program, where you will display 12 rows of the Pascal triangle, but this time make the program not display the 0s!

Save your program in a file called hw7.asm and submit it as usual...

You can get one 1/2 point extra credit if you align the numbers in columns.

1
1 	1 	
1 	2 	1 	
1 	3 	3 	1 	
1 	4 	6 	4 	1 	
1 	5 	10 	10 	5 	1 	
1 	6 	15 	20 	15 	6 	1 	
1 	7 	21 	35 	35 	21 	7 	1
1 	8 	28 	56 	70 	56 	28 	8 ...
1 	9 	36 	84 	126 	126 	84 	36 ...
1 	10 	45 	120 	210 	252 	210 	120 ...
1 	11 	55 	165 	330 	462 	462 	330 ...