Bargraphs best methods

FTDI/Bridgetek EVE2 & EVE3 & EVE4 SPI TFT Series by Matrix Orbital

Moderator: Mods

Post Reply
dood
LCD Geek
Posts: 20
Joined: Fri Oct 30, 2020 5:10 pm

Bargraphs best methods

Post by dood »

Hi' everyone,

I'm working on a EVE project based on Arduino using the Rudolph lib (hello, me again :)).

As this is a dataloger for motorcycle, I would like to print a RPM bargraph.

I think about differents methods :
- Prepare a dozen tiny pictures (rectangles) and print some of them to show the RPM value
- Directly draw these rectangles with VERTEX2F command
- Draw a polygone form (empty) and fill it more or less (filling it from left to right).

Here is the first example I find to show you what I expect (not exactly, but that's the idea) :
Image

Does someone have any recommandations about this ?
Best or other solutions, pros/cons.

avanti
LCD?
Posts: 4
Joined: Mon Jun 08, 2020 5:13 pm

Re: Bargraphs best methods

Post by avanti »

I often find it most efficient to directly write pixels into an image in RAM_G and display it as an image. You can draw anything you like and update it dynamically.

Rudolph
LCD Guru
Posts: 67
Joined: Wed Feb 28, 2018 11:09 am

Re: Bargraphs best methods

Post by Rudolph »

Hmm, the "best" method would be something that is doable with the available resources while beeing pleasant enough to look at. :-)
Bridgetech has a fancy example code somewhere that has a round graph that is using a few tricks like scissors.

Or you could use a rectangle, that is just two points and one coordinate that is changing.
Combined with changing the color for the whole thing and putting a picture over it with alpha channel it could look a little fancy
while beeing highly efficent and mostly functional.

Functional, efficent, that is my cup of tea, fancy not so much.
Not because I do not apreciate fancy, it's more that I do not apreciate what I can do in regards of graphics design. :-)

dood
LCD Geek
Posts: 20
Joined: Fri Oct 30, 2020 5:10 pm

Re: Bargraphs best methods

Post by dood »

Thanks to both of you.

It has to be a little bit fancy even if I'm clearly not the best with design, drawing or anything else close to that job :D

The rectangles thing looks pretty easy and with thin rectangles like 1 or 2 pixels width I should be able to get a smooth shape.
Writing pixels into an image ... why not ... I'll need to RTFM because I'm a EVE's beginner :)

I'll post pictures as soon as I get something nice (or not)

Henry
OMNIPRESENT
OMNIPRESENT
Posts: 3002
Joined: Tue Aug 14, 2001 6:00 pm
Contact:

Re: Bargraphs best methods

Post by Henry »

I ran across this

Henry J.
President
Matrix Orbital

dood
LCD Geek
Posts: 20
Joined: Fri Oct 30, 2020 5:10 pm

Re: Bargraphs best methods

Post by dood »

Very nice !
That's what I'm trying to do :)

Tell us a little bit more about that, what method did you use ?

Henry
OMNIPRESENT
OMNIPRESENT
Posts: 3002
Joined: Tue Aug 14, 2001 6:00 pm
Contact:

Re: Bargraphs best methods

Post by Henry »

I didn't, I just found it, I would recommend reaching out to the author.
Henry J.
President
Matrix Orbital

dood
LCD Geek
Posts: 20
Joined: Fri Oct 30, 2020 5:10 pm

Re: Bargraphs best methods

Post by dood »

Oups I didn't pay attention.
He made available his example here : http://www.mediafire.com/file/x7im4ir7q ... X.rar/file

He uses rectangles method.

Post Reply