File size: 1,419 Bytes
be196d0
 
d76525d
be196d0
d76525d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import streamlit as st

st.title("MyCobot280 Pi control demo")

st.markdown("""
	This app is a public demo of ...
""")

with st.form("mqtt_form"):
    commands = [
        "get-angles", 
        "get-coords", 
        "get-gripper-value",
        "get-camera",
        "send-angles",
        "send-coords",
        "send-gripper-value"
    ]
    selected = st.selectbox("Select command: ", commands)

    if selected == "get-angles":
        if st.form_submit_button("Get Angles"):
            # Add the logic to get angles
            st.write("Executing Get Angles command...")
    elif selected == "get-coords":
        if st.form_submit_button("Get Coords"):
            # Add the logic to get coordinates
            st.write("Executing Get Coords command...")
    elif selected == "get-gripper-value":
        if st.form_submit_button("Get Gripper Value"):
            # Add the logic to get gripper value
            st.write("Executing Get Gripper Value command...")
    elif selected == "get-camera":
        image_quality = st.slider("Select Image Quality", 1, 100, 50)
        if st.form_submit_button("Get Camera"):
            # Add the logic to get camera feed
            st.write(f"Executing Get Camera command with image quality: {image_quality}")
    elif selected == "send-angles":
        pass
    elif selected == "send-coords":
        pass
    elif selected == "send-gripper-value":
        pass