Skip to content

Commit

Permalink
Merge pull request #114 from Capstone-Projects-2024-Spring/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
DanielEap authored Apr 8, 2024
2 parents 19652e3 + 55ae06a commit 7ccbd18
Show file tree
Hide file tree
Showing 73 changed files with 14,071 additions and 1,079 deletions.
10,558 changes: 10,558 additions & 0 deletions Pico/STL/case.stl

Large diffs are not rendered by default.

534 changes: 534 additions & 0 deletions Pico/STL/lid.stl

Large diffs are not rendered by default.

Binary file removed Pico/STL/pico_bme688_bottom.stl
Binary file not shown.
Binary file removed Pico/STL/pico_bme688_large-peg.stl
Binary file not shown.
Binary file removed Pico/STL/pico_bme688_small-peg.stl
Binary file not shown.
Binary file removed Pico/STL/pico_bme688_top.stl
Binary file not shown.
617 changes: 617 additions & 0 deletions Pico/SampleCode/BMP3XX.py

Large diffs are not rendered by default.

61 changes: 61 additions & 0 deletions Pico/SampleCode/get_temp_press.py
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()


69 changes: 65 additions & 4 deletions SmartWeights/SmartWeights.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@
ReferencedContainer = "container:SmartWeights.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<EnvironmentVariables>
<EnvironmentVariable
key = "IDEPreferLogStreaming"
value = "YES"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,21 @@
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "F3434B03-D0CB-43A9-86C7-6AEC0275C3D1"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "SmartWeights/Workout/WorkoutMainPage.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "210"
endingLineNumber = "210"
landmarkName = "StartWorkoutView"
landmarkType = "24">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
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"
},
Expand Down
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"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "dinosaur.png",
"filename" : "Dinosaur.png",
"idiom" : "universal",
"scale" : "1x"
},
Expand Down
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"
},
Expand Down
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"
},
Expand Down
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
}
}

This file was deleted.

2 changes: 1 addition & 1 deletion SmartWeights/SmartWeights/ChallengesTab.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ struct ChallengesTab: View {
var body: some View {
NavigationView {
ChallengesList(challenges: challenges)
.navigationBarTitle("Challenges", displayMode: .inline)
.navigationBarTitle("Achievements", displayMode: .inline)
}
}
}
Expand Down
Loading

0 comments on commit 7ccbd18

Please sign in to comment.