-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #114 from Capstone-Projects-2024-Spring/development
Development
- Loading branch information
Showing
73 changed files
with
14,071 additions
and
1,079 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# -*- coding: utf-8 -* | ||
#from BMP3XX import * | ||
|
||
''' | ||
# i2c_addr = 0x76: pin SDO is low | ||
# i2c_addr = 0x77: pin SDO is high | ||
# Note: Both the BMP390L and gravity version of the BMP388 sensor have pulled the SDO pin high by default, the address is 0x77; but the breakout version does not pull | ||
# the SDO high, and the I2C address is 0x76. | ||
# The following I2C and SPI communications support both BMP388 and BMP390L | ||
''' | ||
sensor = BMP3XX_I2C(i2c_addr = 0x77,bus = 1) | ||
# sensor = BMP3XX_SPI(cs=8, bus=0, dev=0, speed=8000000) | ||
|
||
def setup(): | ||
while (sensor.begin() == False): | ||
print ('Please check that the device is properly connected') | ||
time.sleep(3) | ||
print("sensor begin successfully!!!") | ||
|
||
''' | ||
# 6 commonly used sampling modes that allows users to configure easily, mode: | ||
# ULTRA_LOW_PRECISION, Ultra-low precision, suitable for monitoring weather (lowest power consumption), the power is mandatory mode. | ||
# LOW_PRECISION,Low precision, suitable for random detection, power is normal mode | ||
# NORMAL_PRECISION1, Normal precision 1, suitable for dynamic detection on handheld devices (e.g on mobile phones), power is normal mode | ||
# NORMAL_PRECISION2, Normal precision 2, suitable for drones, power is normal mode | ||
# HIGH_PRECISION, High precision, suitable for low-power handled devices (e.g mobile phones), power is normal mode | ||
# ULTRA_PRECISION, Ultra-high precision, suitable for indoor navigation, its acquisition rate will be extremely low, and the acquisition cycle is 1000 ms. | ||
''' | ||
while(sensor.set_common_sampling_mode(ULTRA_PRECISION) == False): | ||
print ('Set samping mode fail, retrying...') | ||
time.sleep(3) | ||
|
||
''' | ||
# Calibrate the sensor according to the current altitude | ||
# In this example, we use an altitude of 540 meters in Wenjiang District of Chengdu (China). Please change to the local altitude when using it. | ||
# If this interface is not called, the measurement data will not eliminate the absolute difference | ||
# Notice: This interface is only valid for the first call | ||
# If you do not need to eliminate the absolute difference of measurement, please comment the following line | ||
''' | ||
if( sensor.calibrated_absolute_difference(540.0) == True ): | ||
print("Absolute difference base value set successfully!") | ||
|
||
def loop(): | ||
# Read currently measured temperature date directly, unit: °C | ||
print("temperature : %.2f C" %(sensor.get_temperature)) | ||
|
||
# Directly read the currently measured pressure data, unit: pa | ||
print("Pressure : %.2f Pa" %(sensor.get_pressure)) | ||
|
||
# Read altitude, unit: m | ||
print("Altitude : %.2f m" %(sensor.get_altitude)) | ||
|
||
print("\r\b\r\b\r\b\r\b\r") | ||
time.sleep(0.5) | ||
|
||
if __name__ == "__main__": | ||
setup() | ||
while True: | ||
loop() | ||
|
||
|
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file modified
BIN
+45.1 KB
(130%)
...eproj/project.xcworkspace/xcuserdata/danieleap.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
Binary file modified
BIN
+21.7 KB
(120%)
...proj/project.xcworkspace/xcuserdata/jtstanczak.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
Binary file modified
BIN
-19.2 KB
(90%)
...odeproj/project.xcworkspace/xcuserdata/parchea.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
2 changes: 1 addition & 1 deletion
2
...ets.xcassets/apple.imageset/Contents.json → ...ets.xcassets/Apple.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "apple.png", | ||
"filename" : "Apple.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
|
File renamed without changes
2 changes: 1 addition & 1 deletion
2
...ssets.xcassets/cat.imageset/Contents.json → ...ssets.xcassets/Cat.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "cat.png", | ||
"filename" : "Cat.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
|
2 changes: 1 addition & 1 deletion
2
....xcassets/dinosaur.imageset/Contents.json → ....xcassets/Dinosaur.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
2 changes: 1 addition & 1 deletion
2
...ets.xcassets/juice.imageset/Contents.json → ...ssets.xcassets/Dog.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "juice.png", | ||
"filename" : "Dog.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
|
File renamed without changes
2 changes: 1 addition & 1 deletion
2
...ts.xcassets/orange.imageset/Contents.json → ...ets.xcassets/Juice.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "orange.png", | ||
"filename" : "Juice.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
|
File renamed without changes
21 changes: 21 additions & 0 deletions
21
SmartWeights/SmartWeights/Assets.xcassets/Orange.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "Orange.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
File renamed without changes
21 changes: 0 additions & 21 deletions
21
SmartWeights/SmartWeights/Assets.xcassets/dog.imageset/Contents.json
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.