User Tools

Site Tools


haas:fall2020:cprog:projects:fwf0

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
haas:fall2020:cprog:projects:fwf0 [2020/08/13 21:30] – [On your pi] wedgehaas:fall2020:cprog:projects:fwf0 [2020/08/25 17:15] (current) – [Background] wedge
Line 8: Line 8:
 =====Objective===== =====Objective=====
 To create a program that generates a representation of a flag of a certain level of design complexity. To create a program that generates a representation of a flag of a certain level of design complexity.
 +
 +=====Reading=====
 +Please be sure to familiarize yourself with the following content in "[[https://publications.gbdirect.co.uk//c_book/|the C book]]":
 +
 +  * [[https://publications.gbdirect.co.uk//c_book/preface/|Preface]]
 +  * [[https://publications.gbdirect.co.uk//c_book/chapter1/|Chapter 1]]
 +  * [[https://publications.gbdirect.co.uk//c_book/chapter2/|Chapter 2]]
  
 =====Background===== =====Background=====
Line 45: Line 52:
 =====Program===== =====Program=====
 It is your task to write a program that generates a flag image, in the current directory as your source code and binary, named and accessible as **fwf0.png** It is your task to write a program that generates a flag image, in the current directory as your source code and binary, named and accessible as **fwf0.png**
- 
-  * fwf0/flag.png 
  
 The flag is to be an intermediate-level flag (although you might want to start with an easy-level flag to gain some practice with the library and things like coordinates); opting to do and submit something of higher difficulty may earn you some bonus points. The flag is to be an intermediate-level flag (although you might want to start with an easy-level flag to gain some practice with the library and things like coordinates); opting to do and submit something of higher difficulty may earn you some bonus points.
  
 ====On your pi==== ====On your pi====
-To utilize the needed functionality, you will need to ensure you have the following packages installed:+Develop and test this program on your pi. Only when done, verify that it compiles on lab46. 
 + 
 +To utilize the needed functionality for this project, you will need to ensure you have the following packages installed:
  
   * build-essential (hopefully you took care of this in ntr0)   * build-essential (hopefully you took care of this in ntr0)
Line 74: Line 81:
 lab46:~/src/cprog$ grabit cprog fwf0 lab46:~/src/cprog$ grabit cprog fwf0
 make: Entering directory '/var/public/SEMESTER/cprog/fwf0' make: Entering directory '/var/public/SEMESTER/cprog/fwf0'
-'/var/public/SEMESTER/cprog/fwf0/Makefile' -> '/home/wedge/src/cprog/fwf0/Makefile' +'/var/public/SEMESTER/cprog/fwf0/Makefile' -> '/home/user/src/cprog/fwf0/Makefile' 
-'/var/public/SEMESTER/cprog/fwf0/fwf0.c' -> '/home/wedge/src/cprog/fwf0/fwf0.c'+'/var/public/SEMESTER/cprog/fwf0/fwf0.c' -> '/home/user/src/cprog/fwf0/fwf0.c'
 make: Leaving directory '/var/public/SEMESTER/cprog/fwf0' make: Leaving directory '/var/public/SEMESTER/cprog/fwf0'
 lab46:~/src/cprog$  lab46:~/src/cprog$ 
Line 93: Line 100:
 When done and ready to submit, on lab46: **make submit** When done and ready to submit, on lab46: **make submit**
  
 +=====How to view the picture=====
 +Depending on your computing setup, choose the most practical means of viewing your program's image output:
 +
 +====Raspberry Pi desktop====
 +You've got a monitor and keyboard hooked up to your pi that you are using (preferred method for class).
 +
 +Open a file browser, web browser, or image viewer and navigate to/open up your **fwf0.png** image in your **~/src/desig/fwf0/** directory.
 +
 +Rinse and repeat as you go through revisions.
 +
 +====Raspberry Pi command-line via SSH/MOSH====
 +You don't have a monitor, so you are logging into your pi remotely (doable, and good intra-system practice)
 +
 +Once your **Makefile** and **fwf0.c** file are added to your repository, **commit** and **push**.
 +
 +On lab46, **pull** and **update**.
 +
 +Compile:
 +
 +<cli>
 +lab46:~/src/desig/fwf0$ make
 +</cli>
 +
 +and run your program:
 +
 +<cli>
 +lab46:~/src/desig/fwf0$ ./fwf0
 +</cli>
 +
 +... which will produce an image (**fwf0.png**); You want to put this in your web space (with the proper permissions set), so you can view it in a web browser:
 +
 +<cli>
 +lab46:~/src/desig/fwf0$ mv fwf0.png ~/public_html/
 +lab46:~/src/desig/fwf0$ chmod 0644 ~/public_html/fwf0.png
 +</cli>
 +
 +Then, point a web browser at the following URL:
 +
 +  * https://lab46.g7n.org/~yourusername/fwf0.png
 +
 +NOTE: sometimes the web browser caches previous results, you may have to refresh a few times on revisions to get changes to manifest.
 =====Submission===== =====Submission=====
 To successfully complete this project, the following criteria must be met: To successfully complete this project, the following criteria must be met:
haas/fall2020/cprog/projects/fwf0.1597354248.txt.gz · Last modified: 2020/08/13 21:30 by wedge