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.
Locked
User avatar
gallaugher
 
Posts: 267
Joined: Tue Aug 14, 2018 12:42 pm

Dashboard Questions

Post by gallaugher »

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.
Image
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!
Attachments
Issue with Dashboard.png
Issue with Dashboard.png (453.58 KiB) Viewed 127 times

User avatar
brubell
Learn User Page
 
Posts: 2010
Joined: Fri Jul 17, 2015 10:33 pm

Re: Dashboard Questions

Post by brubell »

Hi, could you re-attach the first image. It appears broken in the message and I'd like to see it.

User avatar
brubell
Learn User Page
 
Posts: 2010
Joined: Fri Jul 17, 2015 10:33 pm

Re: Dashboard Questions

Post by brubell »

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.

User avatar
gallaugher
 
Posts: 267
Joined: Tue Aug 14, 2018 12:42 pm

Re: Dashboard Questions

Post by gallaugher »

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

User avatar
brubell
Learn User Page
 
Posts: 2010
Joined: Fri Jul 17, 2015 10:33 pm

Re: Dashboard Questions

Post by brubell »

Thanks for your hard work - do you manage the IO blocks interface, too?
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.
I'll be sure to report back on what they're up to.
Please do! We'll post it up on the blog in the Adafruit IoT Monthly Newsletter

Locked
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.

Return to “Internet of Things: Adafruit IO and Wippersnapper”