Skip to content

Commit 0d67145

Browse files
committed
Add Monitoring (Beta) tab with device connection instructions
1 parent 91f4e39 commit 0d67145

File tree

1 file changed

+33
-2
lines changed

1 file changed

+33
-2
lines changed

streamlit_app.py

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,42 @@
22
import random
33
import time
44

5-
st.set_page_config(page_title="SereniFi Guide IoT Dashboard", layout="centered")
65

7-
st.title("SereniFi Guide IoT Monitoring Dashboard")
6+
# Add navigation options in sidebar
7+
selected_tab = st.sidebar.selectbox("Choose a tab", ["Home", "Monitoring (Beta)", "Other Tabs"])
8+
9+
if selected_tab == "Monitoring (Beta)":
10+
# Add code for Monitoring (Beta) tab
11+
12+
13+
st.title("Monitoring (Beta)")
814
st.write("This dashboard monitors real-time heart rate and stress level data.")
915

16+
if selected_tab == "Monitoring (Beta)":
17+
# Add title and connection instructions
18+
st.title("Monitoring (Beta)")
19+
st.subheader("Connect Your Heart Rate and Stress Monitoring Device")
20+
21+
# Connection instructions
22+
st.markdown("""
23+
To connect your device, please follow these steps:
24+
25+
1. **Enable Bluetooth** on your heart rate monitoring device and the device running this app.
26+
2. **Select Your Device** from the dropdown below and click **Connect**.
27+
3. Once connected, your heart rate and stress levels will appear in real-time.
28+
""")
29+
30+
# Simulated dropdown to select a device (for demonstration purposes)
31+
device_name = st.selectbox("Select Monitoring Device", ["Device 1", "Device 2", "Device 3"])
32+
33+
# Simulate a connect button
34+
if st.button("Connect"):
35+
st.success(f"Connected to {device_name}!")
36+
# Simulate real-time data
37+
st.write("Heart Rate: 72 bpm")
38+
st.write("Stress Level: Moderate")
39+
40+
1041
# Display placeholders for real-time data
1142
heart_rate_display = st.empty()
1243
stress_level_display = st.empty()

0 commit comments

Comments
 (0)