DOC PREVIEW
UIUC GE 423 - Flow chart example

This preview shows page 1 out of 2 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

// Remote Control Pooling Loop int KEY = 0; int commandArray[5] = {0x0002, 0x0003, 0x0004, 0x0008, 0x0012}; int TurnOff = 0x0001, VolUp = 0x0034, VolDown = 0x0037, ChannUp = 0x0038; int ChannDown = 0x0039; while(1) { // This function returns the value of the pressed key KEY = getPressedKey(); switch (KEY) { // Volume Up case “u”: case “U”: sendCommandWord(VolUp); break; // Volume Down case “d”: case “D”: sendCommandWord(VolDown); break; // Channel Up case “r”: case “R”: sendCommandWord(ChannUp); break; // Channel Down case “l”: case “L”: sendCommandWord(ChannDown); break; // Turn Off case “q”: case “Q”: sendCommandWord(TurnOff); break; // Send Commands case “c”: case “C”: index = 0 while(index<5) { sendCommandWord(commandArray[index]); index++; } break; } }StartKEYKEY = getPressedKey();index =0sendCommandWord(VolUp);sendCommandWord(VolDown);sendCommandWord(ChannUp);sendCommandWord(ChannDown);index < 5sendCommandWord(commadArray[index]);Index++;TrueFalse“u” or “U”“d” or “D”“r” or “R”“l” or “L”“c” or “C”sendCommandWord(TurnOff);“q” or “Q”1 == 1


View Full Document

UIUC GE 423 - Flow chart example

Documents in this Course
ARTWORK

ARTWORK

16 pages

Load more
Download Flow chart example
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Flow chart example and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Flow chart example 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?