|
2 | 2 | import random
|
3 | 3 | import time
|
4 | 4 |
|
5 |
| -st.set_page_config(page_title="SereniFi Guide IoT Dashboard", layout="centered") |
6 | 5 |
|
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)") |
8 | 14 | st.write("This dashboard monitors real-time heart rate and stress level data.")
|
9 | 15 |
|
| 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 | + |
10 | 41 | # Display placeholders for real-time data
|
11 | 42 | heart_rate_display = st.empty()
|
12 | 43 | stress_level_display = st.empty()
|
|
0 commit comments