Skip to content

Commit

Permalink
library adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamenm03 committed Jan 23, 2024
1 parent 171d67d commit 9a9eb33
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/Lab3-SD/Lab3-SD.ino
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ void loop() {
dataString += String(tmp2Val);
dataString += ",";
// add the adjusted voltage divider value
dataString += String(vDivValAdj);
dataString += String(vDivAdj);
dataString += ",";
// add the raw pressure value
dataString += String(pressVal);
Expand Down
8 changes: 5 additions & 3 deletions labs/lab-3_1.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Once you have your temperature sensors connected, it's time to make a calibratio
- [Link to MPX4115 Spec Sheet](https://drive.google.com/file/d/1HvO6ww0i4jqZtf4NJvgjcQmIwZw6AqbE/view?usp=sharing)

<div class="primer-spec-callout info" markdown="1">
Pay attention to the required supply voltage for each of these components to prevent accidental damage. You can find these values in the provided spec sheets for each individual component.
Pay attention to the required supply voltage for each of these components to prevent accidental damage. You can find these values in the provided spec sheets for each individual component. In the case of the pressure sensor it is 5v.
</div>

Begin by skimming over the provided spec sheet and become familiar with the pin layout. Connect the sensor to the Arduino, based on the pin-out provided. **You only need to connect the Vin (or VCC), GND, and Vout pins.** Print the data to the Serial Monitor to ensure it is working, using `analogRead()` like before with the temperature sensors, add this to the code with the battery voltage and temperature sensors so that you now have four comma-separated values printed in one line. It may be "Voltage,Temp1,Temp2,Pressure" for example, all in one line.
Expand All @@ -155,7 +155,7 @@ Take measurement data indoors and while walking outside to see changes. Create a

- [Link to ADXL335 Spec Sheet](https://drive.google.com/file/d/1nYnJopSdXv7brn2TT8iLgIH01D7TD_NQ/view?usp=sharing)

Begin by skimming over the provided spec sheet and become familiar with the pin layout. Connect the sensor to the Arduino, based on the pin-out provided and using the **3.3V pin** as the power supply.
Begin by skimming over the provided spec sheet and become familiar with the pin layout. Connect the sensor to the Arduino, based on the pin-out provided and using the **3.3V pin** as the power supply. Each of the axes (x, y, and z) will be connected to its own analog pin. You will not have anything connected to the ST pin.

Add code to the program you've been working with to read raw values from each of the three axes. Then perform a two-point calibration for each axis individually, and update the code to print the new calibrated values in the same comma-delimited format as before. Take a screenshot of the serial monitor printing out a string of data from all of the sensors in the same line, every half second.

Expand All @@ -173,6 +173,8 @@ Unlike the other sensors and modules we have used so far, the MicroSD module we

While your Arduino is powered off and disconnected from the 9V, plug your module in as shown above. The Arduino pins for this **DO** matter and cannot easily be changed, unlike the analog pins.

Plug your microSD card into your computer and ensure that it is empty. If there are files on the card, delete them and empty the trash. You should always clear the card, empty the trash while the card is still inserted, and properly eject it before removing the card from your computer.

Once everything is wired up, put your microSD card into the adapter module and plug in your Arduino. At this point you should modify and upload the code found in File → Examples → ENGR100-950 → Lab3-SD.

Please read through the comments of this code file, as you will be adding additional sensors and modifying this file on your own. In this lab, you may also need to change the analog pins that are the defaults for all of your sensors.
Expand Down Expand Up @@ -208,7 +210,7 @@ On Canvas, you will submit ***ONE PDF*** that will include all of the following:

- [ ] A picture of your complete circuit with proper color conventions
- [ ] Screenshots or exported images of the finished plots from MATLAB (with labels!)
- [ ] A screenshot of your serial monitor once all sensors are printing values in the same line
- [ ] A screenshot of your serial monitor once all sensors are printing values in the same line (you may unplug the Arduino so the data pauses)

To put said content into a PDF, it is suggested you create a new Google Doc ([docs.new](https://docs.new)) and paste your images and write any text in the document. Export/Download this document as a PDF and upload it. **DO NOT SUBMIT A GOOGLE DOC FILE OR SPREADSHEET FILES.**

Expand Down

0 comments on commit 9a9eb33

Please sign in to comment.