Ch10_Solutions_WAM2.2 - NEXT It goes to the “number...

Info icon This preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Chapter 10 Questions 1. What’s are the differences between GOSUB and ON…GOSUB ? GOSUB will execute a subroutine or set of subroutines in a continuous fashion with no regards to the input user input. ON…GOSUB will execute the subroutine that it is commanded to. ON…GOSUB is especially useful when making menus. 2. How do you declare a variable array? UserEntry VAR Byte(#) Where “#” is the number of variables 3. How do you access a particular element in the variable array? UserEntry(#) Where “#” is the index number Chapter 10 Exercises 1. Explain how to use a FOR…NEXT loop with an ON…GOSUB command to cycle through a list of subroutines. FOR Index= 0 TO # ‘#=number of subroutines -1 ON Index GOSUB, SUB1, SUB2, SUB3….SUB#-1
Image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: NEXT It goes to the “number index” subroutine according to input 2. Explain how to add a menu item to TerminalOperatedSensorArray.bs2 that gives the operator the option of making a piezospeaker beep. a) Add “speaker” subroutine name to “ON request GOSUB….” b) Add “5) Speaker” to “display menu” c) Add subroutine of “speaker” FREQOUT pin#, 1000, 2000 RETURN 3. Describe the process you would use (keeping the individual testing rule in mind) to add a piezospeaker circuit to your project. a. Build the piezospeaker circuit on the breadboard. b. Run TestPiezoWithFreqout.bs2 from Chapter 8 to test the speaker. c. Integrate the piezospeaker into the program....
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern