Difference between revisions of "CSC231 Homework 7"
(→Arduino Project Schematics) |
(→Problem #2) |
||
(10 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= | |
− | Below are several examples, some fancier than others. I have added comments | + | 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. | ||
{| border="1" cellpadding="2" | {| border="1" cellpadding="2" | ||
!width="500"|Diagram | !width="500"|Diagram | ||
!width="200"|Comments | !width="200"|Comments | ||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
| | | | ||
[[Image:CSC231_Arduino_diagram2.jpg | 500 px]] | [[Image:CSC231_Arduino_diagram2.jpg | 500 px]] | ||
| | | | ||
− | Very simple. 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. | + | 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. |
|- | |- | ||
| | | | ||
Line 29: | Line 30: | ||
[[Image:CSC231_Arduino_diagram4.png | 500 px]] | [[Image:CSC231_Arduino_diagram4.png | 500 px]] | ||
| | | | ||
− | 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 | + | 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. |
|- | |- | ||
| | | | ||
[[Image:CSC231_Arduino_diagram5.jpg | 500 px]] | [[Image:CSC231_Arduino_diagram5.jpg | 500 px]] | ||
| | | | ||
− | Nice | + | 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. |
|- | |- | ||
| | | | ||
Line 40: | Line 41: | ||
| | | | ||
Another interesting diagram. Here the user uses boxes for everything, which is fine. But some important details are missing (resistors, etc.). | Another interesting diagram. Here the user uses boxes for everything, which is fine. But some important details are missing (resistors, etc.). | ||
+ | |- | ||
+ | | | ||
+ | [[Image:CSC231_Arduino_diagram1.jpg | 500 px]] | ||
+ | | | ||
+ | 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= | ||
+ | |||
+ | 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 |
---|---|
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. | |
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. | |
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. | |
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. | |
Another interesting diagram. Here the user uses boxes for everything, which is fine. But some important details are missing (resistors, etc.). | |
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. | |
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 ...