Scroll one line only

For general Flowcode discussion that does not belong in the other sections.
Post Reply
ctesla75
Posts: 23
http://meble-kuchenne.info.pl
Joined: Tue Nov 22, 2022 10:56 am
Been thanked: 2 times

Scroll one line only

Post by ctesla75 »

Hi All,
Have just got flowcode v9 mainly to play with esp32. I am trying to scroll just the first line of a display and keep the second line static. I have seen it done in C but I am wanting to do it in flowcode as I am not a C programmer
Thanks

ctesla75
Posts: 23
Joined: Tue Nov 22, 2022 10:56 am
Been thanked: 2 times

Re: Scroll one line only

Post by ctesla75 »

Here is my attempt ,My idea was to clear the line i wanted to be static and reprint it at the same posistion after scrolling the whole display
Attachments
scroll.fcfx
(9.88 KiB) Downloaded 258 times

RGV250
Posts: 283
Joined: Sat Mar 19, 2022 4:53 pm
Has thanked: 25 times
Been thanked: 32 times

Re: Scroll one line only

Post by RGV250 »

Hi,
I am sure there is a better way but this does what I think you want.
scroll_1.fcfx
(9.27 KiB) Downloaded 373 times
Bob

mnfisher
Valued Contributor
Posts: 1466
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 136 times
Been thanked: 713 times

Re: Scroll one line only

Post by mnfisher »

This is one way: Oops - too slow - now this is another way...

I've gone with a 'rotating' message - but you could just print relevant part of string.
Scroll2.fcfx
(10.82 KiB) Downloaded 396 times
Martin

ctesla75
Posts: 23
Joined: Tue Nov 22, 2022 10:56 am
Been thanked: 2 times

Re: Scroll one line only

Post by ctesla75 »

Hi Martin ,
Thanks for the reply your code does what i want i just swapped which line rotates , excuse my ignorance but i cannot figure out how to change the abc lettering for my text

ctesla75
Posts: 23
Joined: Tue Nov 22, 2022 10:56 am
Been thanked: 2 times

Re: Scroll one line only

Post by ctesla75 »

HI RGV250,
Thanks for the reply, your code seems to do what i want but i cannot figure how to modify it i wanted the bottom line to be static
i tried changing the position in the cursor without luck, I also wanted the display to rotate and put an if statement tom jump out of it, instead of looping 16 times

mnfisher
Valued Contributor
Posts: 1466
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 136 times
Been thanked: 713 times

Re: Scroll one line only

Post by mnfisher »

Glad to help..

The text displayed is scrollText (a local variable in main) - the 'abcde' is set in it's definition - I've modified to set in a calculation block. Note that to allow longer strings - untick 'make a local copy' in the display macro and use the length of the string instead of 16 too..

Something like:
Scroll2.fcfx
(11.5 KiB) Downloaded 497 times
Note that the string passed needs to have at least 16 characters as the code stands..

MArtin

RGV250
Posts: 283
Joined: Sat Mar 19, 2022 4:53 pm
Has thanked: 25 times
Been thanked: 32 times

Re: Scroll one line only

Post by RGV250 »

Hi,
I have swapped the lines and added a comment, I am quite new to Flowcode so will need read up a bit on how to break out as I think comparisons only work on strings.
scroll_1A.fcfx
(9.89 KiB) Downloaded 343 times
Bob

ctesla75
Posts: 23
Joined: Tue Nov 22, 2022 10:56 am
Been thanked: 2 times

Re: Scroll one line only

Post by ctesla75 »

Thanks for the help everyone, I have some working code now. No its time to slowly figure out the resr

Post Reply