Pre-class Assignment
Please read through and complete the participation exercises under the C++ for lab 1 (and more) section of the zyBook. You can skip any “Try” exercises that require you to download RIMS for windows. Also finish up lab 0 if you haven’t completed it.
Announcements
- Lab 0 should be complete; check in with me after class if you are having issues
- Lab 1 is out and will be due in two weeks
- Lab hours Wednesdays 1:15pm-4pm in Singer 246 (overflow Singer 240/247)
- You can work on Lab 1 in the lab or elsewhere since it doesn’t require much hardware
- Looks like 21 students are subscribed to the zyBook; any tips for those who don’t have it yet?
- Office hours: by appointment (email me if none of those times work)
- The goal of this is to be more flexible / have more times, but I'm also open to a regularly scheduled time! Feel free to come as a group.
Learning Objectives and Outcomes
In this lecture, you will...
- listen to a short lecture on lab 1 and the associated code
- work together with Prof. Delano on an in class exercise
- start sketching out what you’ll do for the
getNumber function for lab 1
By the end of this lecture, you should be able to...
- complete the first half of lab 1 (Exercises 0 – 3)
- Note that unless you are very strong at programing you will likely not finish Exercise 3 by the end of the lab section; this is fine! I expect you to work on this outside of lab.
Lecture Content
- RIMS overview
- Built into browser; great for practicing some basics like bitwise manipulation (which you’ll do for lecture 4)
- Also has a desktop app but Windows only (won’t be required for course but you can use it if you want)
- Lab 1 Overview
- More programming topics for lab 1
- Header and cpp files
- For more information about header and cpp files, see here
enums and struct
- For more information about
enums and structs, see here and here
- What is the
& symbol for when we use pc.write?
- For more information about pointers, see here
Coding Example: getNumber
Let’s say for example we want to get 3 digit numbers from the serial monitor, and we ignore any characters that aren’t digits.