Web app spinner

Post here to discuss any new features, components, chips, etc, that you would like to see in Flowcode.
Post Reply
RGV250
Posts: 442
http://meble-kuchenne.info.pl
Joined: Sat Mar 19, 2022 4:53 pm
Has thanked: 46 times
Been thanked: 45 times

Web app spinner

Post by RGV250 »

Hi,
I have a counter for development just to show that the ESP32 is running and I am getting comms to the web app. It also it shows the web page is responding.
I was going to delete it later but then I thought it would look good if I could put a small icon in the corner just going round and round so I know all is good. I could just have the counter but that is boring.
There is nothing like this so I wondered if I could use a gauge to show 360 degrees and have the count running 0-359 so the needle would just rotate. but that is fixed so will not work.
I think it would be a good addition to show timers etc.

I did think of using a 7 segment display with the segments doing a figure of eight but that would be a lot of code for just a visual effect.

Regards,
Bob

Steve-Matrix
Matrix Staff
Posts: 1861
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 269 times
Been thanked: 443 times

Re: Web app spinner

Post by Steve-Matrix »

Thanks for the suggestion. I'll look into it.

mnfisher
Valued Contributor
Posts: 1940
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 157 times
Been thanked: 911 times

Re: Web app spinner

Post by mnfisher »

The 7-segment display is fairly easy to implement too - if you can write the data to the display register.

Just need to calculate a 'character set' (for example for a rotating star) and then output at intervals.

For real fireworks - there is the 16 segment display :-) (Though the one I did didn't work in simulation)

Martin

RGV250
Posts: 442
Joined: Sat Mar 19, 2022 4:53 pm
Has thanked: 46 times
Been thanked: 45 times

Re: Web app spinner

Post by RGV250 »

there is the 16 segment display
I could not find that, probably reserved for the elite :D
Also there was no example in the web app help but there is for the app developer. Can I assume they are controlled the same and just an oversight.

Regards,
Bob

mnfisher
Valued Contributor
Posts: 1940
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 157 times
Been thanked: 911 times

Re: Web app spinner

Post by mnfisher »

viewtopic.php?t=3494&hilit=16+segment

But tis hardware only at the moment...

RGV250
Posts: 442
Joined: Sat Mar 19, 2022 4:53 pm
Has thanked: 46 times
Been thanked: 45 times

Re: Web app spinner

Post by RGV250 »

Hi,
Not quite a spinner but better than a counter, scrolls round in a figure of 8.
7Seg_Fig_8A.fcfx
(12.57 KiB) Downloaded 70 times
Regards,
Bob

RGV250
Posts: 442
Joined: Sat Mar 19, 2022 4:53 pm
Has thanked: 46 times
Been thanked: 45 times

Re: Web app spinner

Post by RGV250 »

Hi,
A bit of disappointment there, I migrated the macro to my project, added a 7 segment indicator and got loads of errors.
Unfortunately there is no "Show Segments" macro in the web app 7 segment indicator :(

Regards,
Bob

Steve-Matrix
Matrix Staff
Posts: 1861
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 269 times
Been thanked: 443 times

Re: Web app spinner

Post by Steve-Matrix »

There is a SetRawValue macro which should allow you to set segments individually.

RGV250
Posts: 442
Joined: Sat Mar 19, 2022 4:53 pm
Has thanked: 46 times
Been thanked: 45 times

Re: Web app spinner

Post by RGV250 »

Hi Steve,
I must have miss read the reply, I thought it said set segment which is not available in the web app 7 segment component.
There is no help for the SetRawValue option but no idea how to use it.

Regards,
Bob

Steve-Matrix
Matrix Staff
Posts: 1861
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 269 times
Been thanked: 443 times

Re: Web app spinner

Post by Steve-Matrix »

That macro takes a byte value (0 to 255) and each bit in that value corresponds to a specific segment. So 0xFF (i.e. 255) would set all on.

Here's a small example that shows the values and which segments are showing:
https://www.flowcode.co.uk/example/WebC ... gTest.html

Use the switches to control each individual segment. The hex value is the value that you can pass to SetRawValue.

The source for this simple Web Developer example is attached.
Attachments
SevenSegTest.fcweb
(26.97 KiB) Downloaded 13 times

Post Reply