Hi!
I'm trying out Dashboard as I prepare lessons for my students using MQTT, Adafruit IO, and the Pico W in CircuitPython. First - the service is really neat! Students are going to LOVE creating dashboards to remotely control various components.
One issue I've seen is that when I've added a Switch or Color Picker block, those blocks reset when I click on a momentary button that's also on screen. Here's an image that gives you a sense of things.
Is this normal? Is there a way to prevent this? I'd like to keep the last settings of any existing controls, even as other controls are used. Thanks!
Dashboard Questions
Moderators: adafruit_support_bill, adafruit
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
- gallaugher
- Posts: 267
- Joined: Tue Aug 14, 2018 12:42 pm
Dashboard Questions
- Attachments
-
- Issue with Dashboard.png (453.58 KiB) Viewed 127 times
- brubell
- Learn User Page
- Posts: 2010
- Joined: Fri Jul 17, 2015 10:33 pm
Re: Dashboard Questions
Hi, could you re-attach the first image. It appears broken in the message and I'd like to see it.
- brubell
- Learn User Page
- Posts: 2010
- Joined: Fri Jul 17, 2015 10:33 pm
Re: Dashboard Questions
Are you using the same feed for the toggle switch block and the color picker block? My assumption is that whenever you touch the color picker, it writes the RGB hex value to a feed that is also used by the switch block.
In the settings of the toggle switch block, you can see that it the feed linked to it expects a "Button On Value" and "Button Off Value". You are writing an RGB hex value to this feed, so it appears as if it's switching "off".
I'm not sure what the perfect solution is here, but here's an idea:
Mapping two input blocks to the same feed can cause problems as you've seen. Ideally, you will want a feed to control the light strip's power and a feed to control the light strip's color. You may want to use the `brightness` property of the NeoPixel object in CircuitPython to connect to the toggle switch block and map the "off value" as 0 and the "on value" as 255.
In the settings of the toggle switch block, you can see that it the feed linked to it expects a "Button On Value" and "Button Off Value". You are writing an RGB hex value to this feed, so it appears as if it's switching "off".
I'm not sure what the perfect solution is here, but here's an idea:
Mapping two input blocks to the same feed can cause problems as you've seen. Ideally, you will want a feed to control the light strip's power and a feed to control the light strip's color. You may want to use the `brightness` property of the NeoPixel object in CircuitPython to connect to the toggle switch block and map the "off value" as 0 and the "on value" as 255.
- gallaugher
- Posts: 267
- Joined: Tue Aug 14, 2018 12:42 pm
Re: Dashboard Questions
Thanks, Brent,
This seems to work. I'll create a separate feed for each set of blocks that need to be have independently and that might have their states changed by another.
Thanks for your hard work - do you manage the IO blocks interface, too? It's really great & will empower my students for all sorts of neat projects this semester. I'll be sure to report back on what they're up to.
Cheers,
John
This seems to work. I'll create a separate feed for each set of blocks that need to be have independently and that might have their states changed by another.
Thanks for your hard work - do you manage the IO blocks interface, too? It's really great & will empower my students for all sorts of neat projects this semester. I'll be sure to report back on what they're up to.
Cheers,
John
- brubell
- Learn User Page
- Posts: 2010
- Joined: Fri Jul 17, 2015 10:33 pm
Re: Dashboard Questions
Thank you and I work on the firmware/embedded side but am on the Adafruit IO team. We have web developers on the IO team who also post up here, they manage the web interfaces.Thanks for your hard work - do you manage the IO blocks interface, too?
Please do! We'll post it up on the blog in the Adafruit IoT Monthly NewsletterI'll be sure to report back on what they're up to.
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.