# With multiplexing, we don t display all the rows at the same time; we display them sequentially:

Save this PDF as:

Size: px
Start display at page:

Download "With multiplexing, we don t display all the rows at the same time; we display them sequentially:"

## Transcription

1 Beginner s Guide to the PI MATRIX Part 4 : Text Scrolling by Bruce E. Hall, W8BH 1) INTRODUCTION In the first three parts of this series, we looked at how to build the Pi Matrix and how to drive its 16 pins. But 16 pins cannot completely address all 64 LEDs at the same time. In this tutorial we ll talk about multiplexing and learn how to scroll text characters across the display. 2) MULTIPLEXING So far, all of our display routines involve turning on a number of LEDs in a row, and repeating the same pattern over any number of rows. But for some applications, this is not enough. Suppose we need to turn on 3 LEDs in row 1, a different number of LEDs in row 2, and yet another pattern in row 3. We will need this capability if we want to display complex symbols on the display, like text characters. We need multiplexing. With multiplexing, we don t display all the rows at the same time; we display them sequentially: For each row: - Display pattern n on row n - Wait a few milliseconds (at most) If we do this fast enough, our eyes are tricked into thinking that all of the rows are being displayed at the same time. We must refresh the entire display at least 30 times per second, which means that we cannot spend more than about 4 ms on each row. Python does not run too quickly on the Pi, so the wait between rows may be omitted. The following simple routine will do all the multiplexing we need: def MultiplexDisplay (z,count):

2 for count in range(0,count): for row in range(0,8): SetPattern(1<<row,z[row])) The variable Z is a list with 8 elements, each element holding a row pattern: z[0] holds the pattern for row 0, etc. The whole display is refreshed (count) times, giving the user enough time to view and interpret the display. Easy! 3) PUPPIES AND FONTS I thought it would be interesting to draw some characters on the matrix, but my 9 year old daughter had a different idea: puppies. She pulled out some graph paper, asked me to draw the right-sized box, and then proceeded to shade in the squares of her puppy design. She handed the paper back to me, and waited for me to put her design on the matrix. Let s do it! Starting with the top row, we see that only bit 2 is lit. For this we need binary , which is 0x04. In the next row, we have bits 1 and 2, which is 0x06. Here are the values that we will need for all eight rows: 0x04, 0x06, 0x27, 0x44, 0x3C, 0x3C, 0x24, 0x24. That s our list input for the routine: C0 C1 C2 C3 C4 C5 C6 C7 R0 X R1 X X R2 R3 X X R4 R5 R6 X X R7 X X def DisplayPuppy(): z = [0x04, 0x06, 0x27, 0x44, 0x3C, 0x3C, 0x24, 0x24] MultiplexDisplay(z,100) My daughter was pleased, and I was too! This gave me enough encouragement to tackle the alphabet. But surely someone has done this before me. A quick internet search for 8x8 fonts gave me exactly what I needed: 128 characters in ASCII order, encoded as 8 rows of 8 pixels (bits). All I needed to do was pythonize the data into one big list of lists, like this: data = [ [ 0x0C, 0x1E, 0x33, 0x33, 0x3F, 0x33, 0x33, 0x00], U+0041 (A) [ 0x3F, 0x66, 0x66, 0x3E, 0x66, 0x66, 0x3F, 0x00], U+0042 (B) [ 0x3C, 0x66, 0x03, 0x03, 0x03, 0x66, 0x3C, 0x00], U+0043 (C) ] This looks useful, so I put it into its own file, font0.py. To add it to your program, all you have to do is import it. The big list is referred to by the module name, dotted with list name:

3 font0.data. The index to any character in the list is the ascii number of the character, which we can get by using the python function ord. Try this: import font0 char = raw_input( Enter a character to display: ) z = font0.data[ord(char)] print char, z MultiplexDisplay(z,100) With just a few lines of code we can display any character on our Pi Matrix. I added the print z statement for debugging purposes. It is commented out, so it doesn t do anything. Remove the hash and it will show you the character s data. 4) TEXT Now let s try displaying words and sentences. Enter a string, and display each character in the string: def DisplayString(): message = raw_input( Enter a message to display: ) for char in message: z = font0.data[ord(char)] print char, z MultiplexDisplay(z,100) Python is pretty cool here, because it is able to iterate over all of the characters in the message without having to grab each character or explicitly set boundaries. 5) SCROLLING Its confession time: I have no idea how one is supposed to implement a text scroll function. So what follows may be the worst text scrolling routine ever made. But I made it, and it works. To scroll you need two pieces of data: the data that is currently being displayed and the data that is about to be displayed. On our matrix this means we will keep track of data for two characters at a time. I call our current character z, since this is how I started (above), and call the next (buffered) character buf. You can name them better! To scroll, we shift our current display one pixel to the left, and move our buffered data onto the display by the same amount. English is written left-to-right, so leftward scrolling works the best. Let s try an example, the word Pi :

4 X X X X X X Here is our data: the blue boxes are Z, representing what is being displayed on the matrix. The green boxes are buf, the buffered data waiting to be written to the display. z buf In this example we will scroll the word Pi. The P is being displayed, and the i waiting its turn. If we scroll to the left by one pixel, the leftmost blue column disappears. Although only the P is visible, both characters have shifted slightly to the left: X X X X X X X X X X X X To do this in code, take one row at a time. Shift the bits in the row to the left. We just need to make sure that the leftmost bit in the green box (buf) gets transferred to the rightmost bit in blue (z). z < buf < Here is what things look like on the next scroll. The leading part of the I is now appearing on the display. But wait a second what if we were doing a longer word, like pie. We need to add the e, don t we? There is too much space behind the i already: X X X X X X X X X X X X X X X X X Don t worry. Remember that the green box is just a buffer, and isn t being displayed. We ll fill it with a new character as soon as the previous character has been completely shifted into the blue. z < buf < It is time to code the shift routine, using my friends z & buf:

5 def ScrollLeft (z,buf): for row in range(0,8): z[row] >>= 1 if buf[row] & 0x01: z[row] = 0x80 buf[row] >>= 1 shift current image row is lsb of buffer high? rotate lsb of buf into msb of Z shift buffer row, too. The >>= 1 operation shifts the operand one bit: b7 becomes b6, and so on. We do this for each z[row] and buf[row]. The if statement shifts data from buf to z. Now we have all the parts we need to scroll. Start with a blank display, and load the first character into buf. Scroll one bit at a time, and display the data. Every 8 th scroll, load a new character into buf. Done! 6) MAKING IT USEFUL My first python program grabbed user input from a prompt like this: st = raw_input( Enter something: ). There are other ways to get input, though. One method is to take it from a command line parameter, like this:./matrix4.py Go Away! It is easy to get the command line parameters in Python. First, import the sys module. Then, sys.argv will return the list of command line parameters: import sys print sys.argv The program name matrix4.py is contained in sys.argv[0], and our text is in sys.argv[1]. We can also get text from something called standard input. Stdin is the source for command-line programs in all Unix-like operating systems. By default, this is the keyboard. If we want to look for other sources from Python, we can read from sys.stdin instead. Combining the two gives us lots of input choices: import sys if len(sys.argv)>1: st = sys.argv[1] else: st = sys.stdin.read() Now we can get do all sorts of fancy linux stuff, like pipes and redirects:./matrix4.py "The yellow brown dog" echo "once I pondered weak and weary"./matrix4.py cat poem.txt./matrix4.py./matrix4.py <poem.txt

6 7) CONCLUSION Visit mypishop.com and pick up a Pi Matrix display. Build it. Learn some Python and have fun! Pi Matrix tutorial 1, construction: Pi Matrix tutorial 2, test routines: Pi Matrix tutorial 3, toolkit: Pi Matrix tutorial 4, text scrolling: YouTube video: 8) PYTHON SCRIPT for PART4:!/usr/bin/python Matrix4: text scrolling on the Pi Matrix This application will let you scroll text across the Pi Matrix. To learn more, visit w8bh.net Author: Bruce E. Hall Date : 21 Feb 2013 import smbus import time import random import font0 import sys gives us a connection to the I2C bus for timing delays random number generator basic bitmapped 8x8 VGA font for access to command-line parameters Definitions for the MCP23017 chip ADDR = 0x20 The I2C address of our chip DIRA = 0x00 PortA I/O direction, by pin. 0=output, 1=input DIRB = 0x01 PortB I/O direction, by pin. 0=output, 1=input PORTA = 0x12 Register address for PortA PORTB = 0x13 Register address for PortB ORIENTATION = 180 default viewing angle for the pi & matrix set this value according to your viewing angle values are 0 (power jack on left) 90 (power jack on bottom) 180 (power jack on right) 270 (power jack on top) rows = 0x00 starting pattern is (0,0) = all LEDS off columns= 0x00 delay = 0.08 time delay between LED display transitions smaller values = faster animation

7 Lower level routines for bit-manipulation. Nothing here relates to our snazzy Pi Matrix. def ReverseBits (byte): reverse the order of bits in the byte: bit0 <->bit 7, bit1 <-> bit6, etc. value = 0 currentbit = 7 for i in range(0,8): if byte & (1<<i): value = (0x80>>i) currentbit -= 1 return value def ROR (byte): perform a 'rotate right' command on byte bit 1 is rotated into bit 7; everything else shifted right bit1 = byte & 0x01 get right-most bit byte >>= 1 shift right 1 bit if bit1: was right-most bit a 1? byte = 0x80 if so, rotate it into bit 7 return byte def ROL (byte): perform a 'rotate left' command on byte bit 7 is rotated into bit 1; everything else shifted left bit7 = byte & 0x080 get bit7 byte <<= 1 shift left 1 bit if bit7: was bit7 a 1? byte = 0x01 if so, rotate it into bit 1 return byte Lower Level LED Display routines. These write data directly to the Pi Matrix board def Write (register, value): Abstraction of I2C bus and the MCP23017 chip Call with the chip data register & value pair The chip address is constant ADDR (0x20). bus.write_byte_data(addr,register,value) def EnableLEDS (): Set up the for 16 output pins Write(DIRA, 0x00) all zeros = all outputs on PortA Write(DIRB, 0x00) all zeros = all outputs on PortB def DisableLEDS (): Set all outputs to high-impedance by making them inputs Write(DIRA, 0xFF); all ones = all inputs on PortA Write(DIRB, 0xFF); all ones = all inputs on PortB def TurnOffLEDS (): Clear the matrix display Write(PORTA, 0x00) Write(PORTB, 0x00) set all columns low set all rows low def TurnOnAllLEDS ():

8 Turn on all 64 LEDs Write(PORTA, 0xFF) Write(PORTB, 0x00) set all columns high set all rows low def WriteToLED (rowpins,colpins): set logic state of LED matrix pins Write(PORTA, 0x00) turn off all columns; prevent ghosting Write(PORTB, rowpins) set rows first Write(PORTA, colpins) now turn on columns Intermediate-level routines for LED Pixel, Row, Column, and Pattern display def SetPattern (rowpattern,colpattern,orientation=orientation): Applies given row & column patterns to the matrix. For columns, bit 0 is left-most and bit 7 is at far right. For rows, bit 0 is at the top and bit 7 is at the bottom. Example: (0x07,0x03) will set 3 row bits & 2 columns bits, formaing a rectagle of 6 lit LEDS in upper left corner of the matrix, three rows tall and two columns wide. Why? 0x07 = 0b (three lower row bits set). 0x03 = 0b (two lower column bits set). global rows, columns rows = rowpattern columns = colpattern save current row/column if orientation==0: WriteToLED(~rows,ReverseBits(columns)) elif orientation==90: WriteToLED(~columns,rows) elif orientation==180: WriteToLED(~ReverseBits(rows),columns) elif orientation==270: WriteToLED(~ReverseBits(columns),ReverseBits(rows)) def MultiplexDisplay (z,count): call this routine with Z, the image to display on the matrix Z is a list containing 8 bytes (8x8=64 bits for 64 LEDs) z[0] is data for the top row of the display; z[7] is bottom row. count is number of times to cycle the display for count in range(0,count): for row in range(0,8): SetPattern(1<<row,z[row]) quickly display each row Application Routines Main Program & supporting routines go here. def GetSomeText(): Get some text for scrolling on the LEDs. The easiest way is just to prompt for it, like this: st = raw_input("enter a string to display: ") Instead, let's check the command line.

9 If nothing there, then get from standard input. This allows us to do fancy stuff like pipes & redirects like:./myscript.py time./myscript.py "The yellow brown dog" echo "once I pondered weak and weary"./myscript.py cat poem.txt./myscript.py./myscript.py <poem.txt if len(sys.argv)>1: are there any command line args? st = sys.argv[1] yes, so take first one as text else: print "Enter text to display, followed by EOF (Ctrl-D)." st = sys.stdin.read() no, so get standard input instead See if the input was either 'time' or 'date' Display time and date if they were requested. if st=="time": st = 'The time is ' + time.strftime("%i:%m %p") elif st=="date": st = 'The date is ' + time.strftime("%a, %b %d, %Y") Add a space to the end of the message - looks better for repeats st += ' ' return st def CharImage (ch): returns the 8x8 raster image for given character. the result is a list of 8 bytes, 1 byte for each raster row. index = ord(ch) image = list(font0.data[index]) return image def ScrollLeft (z,buf): scrolls image in Z leftward, rotating in data from buf data in Z & buf are both changed by this operation! for row in range(0,8): z[row] >>= 1 if buf[row] & 0x01: z[row] = 0x80 buf[row] >>= 1 for each row in image: shift current image row is lsb of buffer high? rotate lsb of buf into msb z shift buffer row, too. def ScrollText (st): This is the all-important routine! It will scroll the text on the Pi Matrix, left to right. st holds the string that is being scrolled. ch is the character to be scrolled onto the display. buf holds the character image waiting to be scrolled onto display Z holds the character image now being displayed Each character is 8 bits (columns wide), so we will need to scroll left 8 times for each character. Between each scroll operation, we also need to quickly display (multilplex) each of the 8 rows. SPEED = 10 z = [0,0,0,0,0,0,0,0] for character in st: buf = CharImage(character) for shiftcount in range(0,8): MultiplexDisplay(z,SPEED) ScrollLeft(z,buf) scroll speed: lower=faster start with a blank display for each character of text get next character image For each column in image display current image scroll display leftward

10 Main Program here. print "Pi Matrix text scroller starting" bus = smbus.smbus(1) initialize the I2 bus; use '0' for older Pi boards, '1' for newer ones. EnableLEDS() initialize the Pi Matrix board text = GetSomeText() get the text print "displaying '%s'" %text echo text to console ScrollText(text) and scroll it! DisableLEDS() dont leave any LEDs on. print "Done."

### Hello World! Computer Programming for Kids and Other Beginners. Chapter 1. by Warren Sande and Carter Sande. Copyright 2009 Manning Publications

Hello World! Computer Programming for Kids and Other Beginners by Warren Sande and Carter Sande Chapter 1 Copyright 2009 Manning Publications brief contents Preface xiii Acknowledgments xix About this

### Beginner s Guide to the PI LCD

Beginner s Guide to the PI LCD Part 3: Graphics Intro Bruce E. Hall, W8BH 1) INTRODUCTION In Part 1 and Part 2 of this series, we learned how to check the switches and display text on the LCD board (available

### Getting Started. Excerpted from Hello World! Computer Programming for Kids and Other Beginners

Getting Started Excerpted from Hello World! Computer Programming for Kids and Other Beginners EARLY ACCESS EDITION Warren D. Sande and Carter Sande MEAP Release: May 2008 Softbound print: November 2008

### Intro. Scheme Basics. scm> 5 5. scm>

Intro Let s take some time to talk about LISP. It stands for LISt Processing a way of coding using only lists! It sounds pretty radical, and it is. There are lots of cool things to know about LISP; if

### Introduction to Programming with JES

Introduction to Programming with JES Titus Winters & Josef Spjut October 6, 2005 1 Introduction First off, welcome to UCR, and congratulations on becoming a Computer Engineering major. Excellent choice.

### Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller

Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller Table of Contents Introduction!... 1 Part 1: Entering Data!... 2 1.a: Typing!... 2 1.b: Editing

### Blackfin Online Learning & Development

Presentation Title: Multimedia Starter Kit Presenter Name: George Stephan Chapter 1: Introduction Sub-chapter 1a: Overview Chapter 2: Blackfin Starter Kits Sub-chapter 2a: What is a Starter Kit? Sub-chapter

### Interactive Tourist Map

Adobe Edge Animate Tutorial Mouse Events Interactive Tourist Map Lesson 1 Set up your project This lesson aims to teach you how to: Import images Set up the stage Place and size images Draw shapes Make

### Textures and UV Mapping in Blender

Textures and UV Mapping in Blender Categories : Uncategorised Date : 21st November 2017 1 / 25 (See below for an introduction to UV maps and unwrapping) Jim s Notes regarding Blender objects, the UV Editor

### Taskbar: Working with Several Windows at Once

Taskbar: Working with Several Windows at Once Your Best Friend at the Bottom of the Screen How to Make the Most of Your Taskbar The taskbar is the wide bar that stretches across the bottom of your screen,

### ECE 206, Fall 2001: Lab 3

ECE 206, : Lab 3 Data Movement Instructions Learning Objectives This lab will give you practice with a number of LC-2 programming constructs. In particular you will cover the following topics: - Load/store

### All textures produced with Texture Maker. Not Applicable. Beginner.

Tutorial for Texture Maker 2.8 or above. Note:- Texture Maker is a texture creation tool by Tobias Reichert. For further product information please visit the official site at http://www.texturemaker.com

### CSCI 2212: Intermediate Programming / C Chapter 15

... /34 CSCI 222: Intermediate Programming / C Chapter 5 Alice E. Fischer October 9 and 2, 25 ... 2/34 Outline Integer Representations Binary Integers Integer Types Bit Operations Applying Bit Operations

### Functions and Decomposition

Unit 4 Functions and Decomposition Learning Outcomes Design and implement functions to carry out a particular task. Begin to evaluate when it is necessary to split some work into functions. Locate the

### Bits and Bytes. Here is a sort of glossary of computer buzzwords you will encounter in computer use:

Bits and Bytes Here is a sort of glossary of computer buzzwords you will encounter in computer use: Bit Computer processors can only tell if a wire is on or off. Luckily, they can look at lots of wires

### The Beauty and Joy of Computing 1 Lab Exercise 1: Introduction to Scratch/BYOB - Animations and Communication

The Beauty and Joy of Computing 1 Lab Exercise 1: Introduction to Scratch/BYOB - Animations and Communication Objectives By completing this lab exercise, you should learn to understand the basic user interface

### Get comfortable using computers

Mouse A computer mouse lets us click buttons, pick options, highlight sections, access files and folders, move around your computer, and more. Think of it as your digital hand for operating a computer.

### Chapter Two - SRAM 1. Introduction to Memories. Static Random Access Memory (SRAM)

1 3 Introduction to Memories The most basic classification of a memory device is whether it is Volatile or Non-Volatile (NVM s). These terms refer to whether or not a memory device loses its contents when

### Animations involving numbers

136 Chapter 8 Animations involving numbers 8.1 Model and view The examples of Chapter 6 all compute the next picture in the animation from the previous picture. This turns out to be a rather restrictive

### Lecture 3 - Template and Vectors

Lecture - Template and Vectors Homework Format and Template: We ll each develop a simple template to use to start any new homework. The idea of a template is to layout the basic structure of what goes

### An Illustrated Guide to Shell Magic: Standard I/O & Redirection

An Illustrated Guide to Shell Magic: Standard I/O & Redirection Created by Brennen Bearnes Last updated on 2015-03-03 05:15:07 PM EST Guide Contents Guide Contents Overview Input & Output Standard I/O

### Digitizer Leapfrogging

Digitizer Leapfrogging Leapfrogging lets you digitize objects that are larger than your digitizing arm. You start with one section of the object, then leapfrog around by creating leapfrog stations in both

### Part 1: Understanding Windows XP Basics

542362 Ch01.qxd 9/18/03 9:54 PM Page 1 Part 1: Understanding Windows XP Basics 1: Starting Up and Logging In 2: Logging Off and Shutting Down 3: Activating Windows 4: Enabling Fast Switching between Users

### NCMail: Microsoft Outlook User s Guide

NCMail: Microsoft Outlook 2007 Email User s Guide Revision 1.1 3/9/2009 This document covers how to use Microsoft Outlook 2007 for accessing your email with the NCMail Exchange email system. The syntax

### CSCI 1100L: Topics in Computing Lab Lab 1: Introduction to the Lab! Part I

CSCI 1100L: Topics in Computing Lab Lab 1: Introduction to the Lab! Part I Welcome to your CSCI-1100 Lab! In the fine tradition of the CSCI-1100 course, we ll start off the lab with the classic bad joke

### Wacom Tablet. start-up guide. Nina Mingioni

Wacom Tablet start-up guide Nina Mingioni www.ninamingioni.com Why all photographers need a tablet to edit Getting a tablet has been on my to-do list for a long time. When I finally got one, I was so intimidated

### If Statements, For Loops, Functions

Fundamentals of Programming If Statements, For Loops, Functions Table of Contents Hello World Types of Variables Integers and Floats String Boolean Relational Operators Lists Conditionals If and Else Statements

### Variables, expressions and statements

Variables, expressions and statements 2.1. Values and data types A value is one of the fundamental things like a letter or a number that a program manipulates. The values we have seen so far are 2 (the

### Bonus Ch. 1. Subdivisional Modeling. Understanding Sub-Ds

Bonus Ch. 1 Subdivisional Modeling Throughout this book, you ve used the modo toolset to create various objects. Some objects included the use of subdivisional surfaces, and some did not. But I ve yet

### Intermediate/Advanced Python. Michael Weinstein (Day 2)

Intermediate/Advanced Python Michael Weinstein (Day 2) Topics Review of basic data structures Accessing and working with objects in python Numpy How python actually stores data in memory Why numpy can

### Binary, Hexadecimal and Octal number system

Binary, Hexadecimal and Octal number system Binary, hexadecimal, and octal refer to different number systems. The one that we typically use is called decimal. These number systems refer to the number of

### Flash offers a way to simplify your work, using symbols. A symbol can be

Chapter 7 Heavy Symbolism In This Chapter Exploring types of symbols Making symbols Creating instances Flash offers a way to simplify your work, using symbols. A symbol can be any object or combination

### Getting Started with Silo

CHAPTER 1 Getting Started with Silo In this chapter, we discuss how to view, select, and manipulate models in Silo. If you are not familiar with Silo or polygon modeling, make sure to read the About Silo

### CHAPTER 1. Interface Overview 3 CHAPTER 2. Menus 17 CHAPTER 3. Toolbars and Tools 33 CHAPTER 4. Timelines and Screens 61 CHAPTER 5.

FLASH WORKSPACE CHAPTER 1 Interface Overview 3 CHAPTER 2 Menus 17 CHAPTER 3 Toolbars and Tools 33 CHAPTER 4 Timelines and Screens 61 CHAPTER 5 Panels 69 CHAPTER 6 Preferences and Printing 93 COPYRIGHTED

### Welcome Back! Without further delay, let s get started! First Things First. If you haven t done it already, download Turbo Lister from ebay.

Welcome Back! Now that we ve covered the basics on how to use templates and how to customise them, it s time to learn some more advanced techniques that will help you create outstanding ebay listings!

### Creating a Brochure in Publisher

Creating a Brochure in Publisher If you closed the Flyer, as indicated above, you will see the Microsoft Publisher Task Pane on the left side of your screen. Click the Brochures selection in the Publication

### Mastering Truspace 7

How to move your Truespace models in Dark Basic Pro by Vickie Eagle Welcome Dark Basic Users to the Vickie Eagle Truspace Tutorials, In this first tutorial we are going to build some basic landscape models

### i M E C H A N I A i CHAPTER 1

i M E C H A N I A i CHAPTER 1 1 EXPLODING DOTS CHAPTER 1 MACHINES Welcome to a journey. It is a mathematical journey based on a story from me, James, that isn t true. When I was a child I invented a machine

### Foundations, Reasoning About Algorithms, and Design By Contract CMPSC 122

Foundations, Reasoning About Algorithms, and Design By Contract CMPSC 122 I. Logic 101 In logic, a statement or proposition is a sentence that can either be true or false. A predicate is a sentence in

Your First Windows Form From now on, we re going to be creating Windows Forms Applications, rather than Console Applications. Windows Forms Applications make use of something called a Form. The Form is

### A Brief Introduction to the Linux Shell for Data Science

A Brief Introduction to the Linux Shell for Data Science Aris Anagnostopoulos 1 Introduction Here we will see a brief introduction of the Linux command line or shell as it is called. Linux is a Unix-like

### : Intro Programming for Scientists and Engineers Final Exam

Final Exam Page 1 of 6 600.112: Intro Programming for Scientists and Engineers Final Exam Peter H. Fröhlich phf@cs.jhu.edu December 20, 2012 Time: 40 Minutes Start here: Please fill in the following important

### Introduction to Scripting using bash

Introduction to Scripting using bash Scripting versus Programming (from COMP10120) You may be wondering what the difference is between a script and a program, or between the idea of scripting languages

### 5 R1 The one green in the same place so either of these could be green.

Page: 1 of 20 1 R1 Now. Maybe what we should do is write out the cases that work. We wrote out one of them really very clearly here. [R1 takes out some papers.] Right? You did the one here um where you

### Using Microsoft Power Point

Using Microsoft Power Point Using the Menus in both the English and Japanese Versions Toolbars Shortcuts Resources on the Web Contents Menus Page Main Menu 1 File Menu 2 Edit Menu 3 View Menu 4 Insert

Outlook Web Access To access your mail, open Internet Explorer and type in the address http://www.scs.sk.ca/exchange as seen below. (Other browsers will work but there is some loss of functionality) In

### You ll notice at the bottom of the file menu there is a list of recently opened files. You can click a file name in the list to re-open that file.

Using Microsoft Word A word processor is all about working with large amounts of text, so learning the basics of text editing is essential to being able to make the most of the program. The first thing

DESIGN YOUR OWN BUSINESS CARDS USING VISTA PRINT FREE CARDS I m sure we ve all seen and probably bought the free business cards from Vista print by now. What most people don t realize is that you can customize

### Smoother Graphics Taking Control of Painting the Screen

It is very likely that by now you ve tried something that made your game run rather slow. Perhaps you tried to use an image with a transparent background, or had a gazillion objects moving on the window

### Basic Triangle Congruence Lesson Plan

Basic Triangle Congruence Lesson Plan Developed by CSSMA Staff Drafted August 2015 Prescribed Learning Outcomes: Introduce students to the concept of triangle congruence and teach them about the congruency

### Modules and Programs 1 / 14

Modules and Programs 1 / 14 Python Programs Python code organized in modules, packages, and scripts. We ve already used some modules, now we ll learn what they are, how they re orgainized in packages,

### Device: PLT This document Version: 1. For hardware Version: 1. For firmware Version: Date: 9 May 2014

Device: PLT-2001 This document Version: 1 For hardware Version: 1 For firmware Version: 5.00 Date: 9 May 2014 Description: LED Matrix Display Driver board PLT-2001v1 datasheet Page 2 Contents Introduction...

### CheckBook Pro 2 Help

Get started with CheckBook Pro 9 Introduction 9 Create your Accounts document 10 Name your first Account 11 Your Starting Balance 12 Currency 13 We're not done yet! 14 AutoCompletion 15 Descriptions 16

### Making ecards Can Be Fun!

Making ecards Can Be Fun! A Macromedia Flash Tutorial By Mike Travis For ETEC 664 University of Hawaii Graduate Program in Educational Technology April 4, 2005 The Goal The goal of this project is to create

### HAPPY HOLIDAYS PHOTO BORDER

HAPPY HOLIDAYS PHOTO BORDER In this Photoshop tutorial, we ll learn how to create a simple and fun Happy Holidays winter photo border! Photoshop ships with some great snowflake shapes that we can use in

### NCMail: Microsoft Outlook User s Guide

NCMail: Microsoft Outlook 2003 Email User s Guide Revision 1.0 11/10/2007 This document covers how to use Microsoft Outlook 2003 for accessing your email with the NCMail Exchange email system. The syntax

### Fractions and their Equivalent Forms

Fractions Fractions and their Equivalent Forms Little kids use the concept of a fraction long before we ever formalize their knowledge in school. Watching little kids share a candy bar or a bottle of soda

### Here we will look at some methods for checking data simply using JOSM. Some of the questions we are asking about our data are:

Validating for Missing Maps Using JOSM This document covers processes for checking data quality in OpenStreetMap, particularly in the context of Humanitarian OpenStreetMap Team and Red Cross Missing Maps

### A new clients guide to: Activating a new Studio 3.0 Account Creating a Photo Album Starting a Project Submitting a Project Publishing Tips

Getting Started With Heritage Makers A Guide to the Heritage Studio 3.0 Drag and Drop Publishing System presented by Heritage Makers A new clients guide to: Activating a new Studio 3.0 Account Creating

### Project 1 Balanced binary

CMSC262 DS/Alg Applied Blaheta Project 1 Balanced binary Due: 7 September 2017 You saw basic binary search trees in 162, and may remember that their weakness is that in the worst case they behave like

### HYPERSTUDIO TOOLS. THE GRAPHIC TOOL Use this tool to select graphics to edit. SPRAY PAINT CAN Scatter lots of tiny dots with this tool.

THE BROWSE TOOL Us it to go through the stack and click on buttons THE BUTTON TOOL Use this tool to select buttons to edit.. RECTANGLE TOOL This tool lets you capture a rectangular area to copy, cut, move,

### Microsoft Office Excel

Microsoft Office 2007 - Excel Help Click on the Microsoft Office Excel Help button in the top right corner. Type the desired word in the search box and then press the Enter key. Choose the desired topic

### Installing and Configuring the Voice UPB Bridge updated 22-Jan-2018

Installing and Configuring the Voice UPB Bridge updated 22-Jan-2018 Before starting these instructions, you should already have your Voice assistant installed and working. These instructions can be used

### GDB Tutorial. A Walkthrough with Examples. CMSC Spring Last modified March 22, GDB Tutorial

A Walkthrough with Examples CMSC 212 - Spring 2009 Last modified March 22, 2009 What is gdb? GNU Debugger A debugger for several languages, including C and C++ It allows you to inspect what the program

### Hello! ios Development

SAMPLE CHAPTER Hello! ios Development by Lou Franco Eitan Mendelowitz Chapter 1 Copyright 2013 Manning Publications Brief contents PART 1 HELLO! IPHONE 1 1 Hello! iphone 3 2 Thinking like an iphone developer

### Excellence with Excel: Quiz Questions Module 6 Graphs and Charts

Excellence with Excel: Quiz Questions Module 6 Graphs and Charts 1. Suppose that you have a company s annual revenue by year. How could you create a simple column chart for this data? a. Select all the

### IT82: Multimedia Macromedia Director Practical 1

IT82: Multimedia Macromedia Director Practical 1 Over the course of these labs, you will be introduced Macromedia s Director multimedia authoring tool. This is the de facto standard for time-based multimedia

### stdin, stdout, stderr

stdin, stdout, stderr stdout and stderr Many programs make output to "standard out" and "standard error" (e.g. the print command goes to standard out, error messages go to standard error). By default,

### Karlen Communications Accessible Word Document Design: Images and Alt Text. Karen McCall, M.Ed.

Karlen Communications Accessible Word Document Design: Images and Alt Text Karen McCall, M.Ed. Table of Contents Introduction... 3 Creating Pictures with Print Screen... 4 Creating Pictures with Snipping

### A Quick and Easy Guide To Using Canva

A Quick and Easy Guide To Using Canva Canva is easy to use and has great tools that allow you to design images that grab anyone s eye. These images can be used on your personal website, Pinterest, and

### MicroToys Guide: PS/2 Mouse N. Pinckney April 2005

Introduction A computer mouse provides an excellent device to acquire 2D coordinate-based user input, since most users are already familiar with it. Most mice usually come with two or three buttons, though

### LED Tetris. Final Project Report December 9, 2016 Robert Linden and Paul Slaats GitHub Url: https://github.com/robertmlinden/e155-tetris

LED Tetris Final Project Report December 9, 2016 Robert Linden and Paul Slaats GitHub Url: https://github.com/robertmlinden/e155-tetris Abstract: There is no easy method to create a game of Tetris with

### Using GitHub to Share with SparkFun a

Using GitHub to Share with SparkFun a learn.sparkfun.com tutorial Available online at: http://sfe.io/t52 Contents Introduction Gitting Started Forking a Repository Committing, Pushing and Pulling Syncing

### Using Eclipse for Java. Using Eclipse for Java 1 / 1

Using Eclipse for Java Using Eclipse for Java 1 / 1 Using Eclipse IDE for Java Development Download the latest version of Eclipse (Eclipse for Java Developers or the Standard version) from the website:

Reading and manipulating files Goals By the end of this lesson you will be able to Read files without using text editors Access specific parts of files Count the number of words and lines in a file Sort

### CSS Crash Course for Fearless Bloggers by Gill Andrews

CSS Crash Course for Fearless Bloggers by Gill Andrews The main principle of using CSS with HTML... 2 Why not leave all the CSS inside the HTML?... 5 You think you did everything right, but your style

### EXCEL TIPS and TRICKS FROM MADDOG ENTERPRISES LLC

EXCEL TIPS AND TRICKS, COMPILED BY ED CRANE, AND UPDATED PERIODICALLY (LAST UPDATE, FEB 15 2008) 1) THE FORMULA BAR AND EDITING TEXT. 1a) Do you see what's called the "formula bar" just above the column

### Make a Halloween Card with CorelDRAW

Make a Halloween Card with CorelDRAW In this tutorial we are going to show you how to quickly create a spooky Halloween card. We will be using a lot of the free designs available in CorelDRAW Graphic Suite

### Midterm Exam 2B Answer key

Midterm Exam 2B Answer key 15110 Principles of Computing Fall 2015 April 6, 2015 Name: Andrew ID: Lab section: Instructions Answer each question neatly in the space provided. There are 6 questions totaling

### Part 1 Simple Arithmetic

California State University, Sacramento College of Engineering and Computer Science Computer Science 10A: Accelerated Introduction to Programming Logic Activity B Variables, Assignments, and More Computers

### >print "hello" [a command in the Python programming language]

What Is Programming? Programming is the process of writing the code of computer programs. A program is just a sequence of instructions that a computer is able to read and execute, to make something happen,

### How to decrypt 3ds ROM s: This Guide is STRICTLY for 3DS s that are on firmware s I will go back and make this

How to decrypt 3ds ROM s: WAIT!!!!! BEFORE WE BEGIN THERE ARE A FEW THINGS!!! This Guide is STRICTLY for 3DS s that are on firmware s 4.1-4.5. I will go back and make this tutorial for users that are on

### srl - shift right logical - 0 enters from left, bit drops off right end note: little-endian bit notation msb lsb "b" for bit

Clemson University -- CPSC 231 Shifts (p. 123) srl - shift right logical - 0 enters from left, bit drops off right end 0 b 31 b 30 b 2 b 1 b 0 note: little-endian bit notation msb lsb "b" for bit a f 5

### Computer Essentials Session 1 Step-by-Step Guide

Note: Completing the Mouse Tutorial and Mousercise exercise which are available on the Class Resources webpage constitutes the first part of this lesson. ABOUT PROGRAMS AND OPERATING SYSTEMS Any time a

### Running Wordstar 6 on Windows 7 Using vdos

Running Wordstar 6 on Windows 7 Using vdos Thanks to Dennis McCunney for helping me learn how to set vdos up. DISCLAIMER #1: As explained below, I am running Wordstar 6 for DOS on a Windows 7 (64- bit)

### 2.2" TFT Display. Created by lady ada. Last updated on :19:15 PM UTC

2.2" TFT Display Created by lady ada Last updated on 2017-12-22 11:19:15 PM UTC Guide Contents Guide Contents Overview Pinouts Assembly Arduino Wiring Arduino UNO or Compatible Wiring Wiring for Other

### Create a Cool Vector Robot Character in Illustrator

Create a Cool Vector Robot Character in Illustrator In this tutorial, we will use various tools and techniques to create a simple vector robot character and learn the basic of Adobe Illustrated. With this

### Learn a lot beyond the conventional VLOOKUP

The Ultimate Guide Learn a lot beyond the conventional VLOOKUP Hey there, Howdy? =IF ( you are first timer at Goodly, Then a very warm welcome here, Else for all my regular folks you know I love you :D

### Fractions and their Equivalent Forms

Fractions Fractions and their Equivalent Forms Little kids use the concept of a fraction long before we ever formalize their knowledge in school. Watching little kids share a candy bar or a bottle of soda

### Topic Notes: Java and Objectdraw Basics

Computer Science 120 Introduction to Programming Siena College Spring 2011 Topic Notes: Java and Objectdraw Basics Event-Driven Programming in Java A program expresses an algorithm in a form understandable

### Image Manipulation in MATLAB Due Monday, July 17 at 5:00 PM

Image Manipulation in MATLAB Due Monday, July 17 at 5:00 PM 1 Instructions Labs may be done in groups of 2 or 3 (i.e., not alone). You may use any programming language you wish but MATLAB is highly suggested.

### Decisions, Decisions. Testing, testing C H A P T E R 7

C H A P T E R 7 In the first few chapters, we saw some of the basic building blocks of a program. We can now make a program with input, processing, and output. We can even make our input and output a little

### CONVERSION TRACKING PIXEL GUIDE

Conversion Tracking Pixel Guide A Step By Step Guide to Installing a conversion tracking pixel for your next Facebook ad. Go beyond clicks, and know who s converting. PRESENTED BY JULIE LOWE OF SOCIALLY

### Learning Management System (LMS) General FAQs

Learning Management System (LMS) General FAQs Table of Contents 1. Software and Hardware Requirements a. What are the minimum system requirements for this training? b. Is this training available on the

### Drawing Fast The Graphics Pipeline

Drawing Fast The Graphics Pipeline CS559 Fall 2016 Lectures 10 & 11 October 10th & 12th, 2016 1. Put a 3D primitive in the World Modeling 2. Figure out what color it should be 3. Position relative to the

### Word Prediction Project Due Sunday, May 1

Word Prediction Project Due Sunday, May 1 For this project you may work with a partner, or you may work alone. Either way you are responsible for getting the project finished and in on time. If you choose