## Objectives

• Use `if`-statements with strings
• Work with Ohm's law.

Read the Scholastic Honesty Policy and Assignment Integrity policies of the syllabus. Here are some clarifications for this particular assignment:

• You are expected to work either by yourself or with one other student of this class following the rules of Pair Programming for Homework Assignments.
• You may NOT give a copy of your code to your designated pair-programming partner if you did not develop the code together.
• You must breadboard the circuits yourself or with a pair-programming partner.
• You may NOT look at another student's code until you complete and submit this assignment, except for code you develop together with your pair-programming partner.
• You may get help from people other than your pair-programming partner if you get stuck, but only if they do not show or tell you the code to type.

## Code Lab

• Do the Tutorial Exercises in Code Lab 2
• Do the Tutorial Exercises in Code Lab 3

## Project A: Voltage Levels

In this project we decide on high and low voltage levels.

#### Specifications

1. You should have installed the pressure sensor in class.
2. Start with the code from the class exercise that you saved into `voltmeter.ino`
3. Save the new sketch using the name `resistor_calc``.ino`
4. Experimentally determine the voltages when you apply different levels of force to the sensor
1. What is the voltage with the sensor under no pressure?
2. What is the voltage when you squeeze the sensor firmly? (not too hard, you'll damage it!)
5. Use equations you learned in class to calculate the resistance of the squeeze sensor
6. Display the resistance on the serial monitor.
7. Submit your `resistor_calc.ino` file as part of this assignment.

#### Example Output

``````    Resistor is: 5124.1 ohms
``````

## Style Requirements

Remember to follow all the style rules from previous assignments, as well as the new rules we recently covered, including:

1. File comment block (see: File Comment Block)
2. Descriptive and meaningful variable names (see: Use Meaningful Names)
3. Using the variable naming conventions (see: Variable Names)
4. Indentation inside curly braces (see: Indentation)
5. Proper use of spaces around operators (see: Spacing Around Operators

The instructor will evaluate your assignment using the following criteria. Thus you should check your assignment against these criteria to maximize your score.

Each criteria represents a specific achievement of your assignment and has a scoring guide. The scoring guide explains the possible scores you can receive. Some scoring guides have a list of indicators. These indicators are a sign of meeting, or a symptom of not meeting, the specific criterion. Note that a single indicator may not always be reliable or appropriate in a given context. However, as a group, they show the condition of meeting the criterion.

For information on grading policies, including interpretation of scores, see the syllabus.

#### How to Submit

Upload all project files to Canvas in the project folder that matches the name of this project. Include the following items for grading:

1. Class exercise files (5 points)
1. resistor.fzz (optional)
2. voltmeter.ino
3. calculator.ino
2. Project files (20 points)
1. resistor_calc.ino

You must submit all the files needed to complete your assignment. Your assignment must work as submitted. Remember to test and double check your files before submitting them. If you make a mistake, you can resubmit up to the deadline, but must resubmit all your assignment files.