ChipChop Support Forum
Log in
Log out
Join the forum
My Details
REPLIES: 6
VIEWS: 239
BACK
REPLY TO THIS POST
Riccardo
28 Feb 2024
Component request
Hello I'm wondering if there's a component suitable for a drop down menu or a multi button component (with editable text) that send to the device a numerical value to a variable depending on which button has been pushed or depending on which item in the menu has been selected.
Thanks
Riccardo
Gizmo
29 Feb 2024

Hi Riccardo,

I haven't had a request for a drop down yet, it's a good idea.

I need to have a think how to implement it, it's not a big problem if the drop down would just be used to send a command as ...how to explain it..."pass through" command without recording a status or being able to "remember" what it sent.

Basically, it sends something but doesn't really care about any return values. Like a button on a TV remote, or a momentary switch button (you already have those), you press it, it sends something and returns to its neutral state.

Currently the "custom" button components allow you to set up 2 custom values or a momentary button can send a single value.
They will send whatever you specify and they will send a string but all you need to do is command_value.toInt() or command_value.toFloat() at the other end to convert it into a number.
Have you looked into "Custom buttons"?

Also, the "Pin Code" can send any integer number but it has to be entered manually so that's probably not what you need.

A drop down list would probably be easier to make but I could try to make something with buttons side by side. I would have to limit the number of options, maybe 6-7 per component and the length of the values you can send as there is a limit on the size of the data packets to keep things working fast.

Can you please describe me a scenario how you would want to use it, it will help me design the interface quicker. Also, a suggestion for the component type name would be great!




Attached images
Riccardo
29 Feb 2024

Hi Thanks for the suggestions, I checked the custom button but 2 options are too few. The scenario is exactly the remote control example you mentioned; I have a MODE selector that can have more than 6 possible values, For the feedback I can arrange something with a feedback variable reporting the selected item; I thought to the pin and text components, but i would like to have a predefined set of commands without the need to remember the pin or the text to send.
Gizmo
29 Feb 2024

Yeah, I thought that's what you had in mind.

Ok, so , technically it's not a biggie to implement, most of the pain/time is building the interface in the Dev Console and App.

The only slight issue I have is the number of options, I have to limit it to something? Can we settle at 10 options per dropdown?

If you have more options you may have to add an extra drop down but If you run out of components for your devices just let me know and I'll increase the limit on your account no problems.

I need to look into this properly so who knows there may be a more elegant solution that will cover all bases, give me couple of days and I'll have it done.



Riccardo
29 Feb 2024

Hi Gizmo,
10 options look fine. and no hurry.
thanks
Riccardo
Gizmo
03 Mar 2024

Hi Riccardo,

I've made what you were asking for :-)

It took a bit longer than I was expecting but I've got there in the end.

I think I've managed to make it a bit more user friendly than a plain drop down and it can be both used as a momentary button or buttons with memory just by the way you send the updateStatus().

I will post later today a bit more info on the feature but if you want to try it it's a new component type called "Button Group".
Riccardo
04 Mar 2024

Thanks a lot.
Regards
Riccardo