cobot280pi / app.py
gursi26's picture
changes
d76525d
raw
history blame
1.42 kB
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