CSC270 Demo Page 2019

From CSclasswiki
Jump to: navigation, search

Thiebaut (talk) 19:30, 8 April 2019 (EDT)


You can force the table of contents anywhere by putting the word __TOC__ by itself at the beginning of a line. For example, below this box.



Introduction

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum

The steps to follow are:

  • Step 1: get up
    • Step 1.1: go to kitchen
    • Step 1.2: make coffee
    • Step 1.3: drink coffee

The best coffee grains:

  1. Hawaiian grains
  2. Blends of Hawaiian grains
  3. Columbian grains
  4. Koffee Kult dark roast
  5. Valhalla Java ground roast
  6. Lavazza Super Krema

Including a video


The YouTube video, below, has url https://www.youtube.com/watch?v=q2K3v29zeOM, and you can add it inline with the page by using a tag of the form: <videoflash>q2K3v29zeOM</videoflash>

The Project

You can indent a paragraph using colons (:) as the first characters of a line.

for example, this paragraph is indented
this line is indented a bit more.

The command for getting the history of my commands on the pi, is:

history

Arduino Side

Arduino.jpg

(The image above links to a Web page on docs.labs.mediatek.com.)

Arduino.jpg

(The image above links to a local page.)


Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Arduino2.jpg


Left-Aligned Image

Arduino2.jpg
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


Right-Aligned Image

Arduino2.jpg

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Code for Raspberry Pi

// display: gets a digit as parameter and displays
// it as a collection of 8 lines, with stars and spaces
// Uses the data stored in the global array "matrix"
void display( int digit ) {
  // displays a digit as an 8x8 matrix
  for ( int row=0; row<8; row++ ) {
    int val = matrix[digit][row];
    int mask = 0x80;     // set mask to 10000000 binary

    // go through all the bits of val, and if a bit is 1
    // print a '*' else print a ' '
    for ( int bitCount=0; bitCount<8; bitCount++ ) {
      if ( (mask & val) != 0 ) 
        printf( "*" );
      else
        printf( " " );
      mask = mask >> 1; // shift mask to the right, 1 bit
    }
    printf( "\n" );
  }
}

Code Pages

You may want to have your code listed in a separate page. You can reference to different sections of that page using the #-sign in the link.

For example, this page contains two code sections.


References