Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 18:57 07 Jul 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Bargraph with LCD panel

Author Message
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1702
Posted: 09:23pm 20 Jul 2016
Copy link to clipboard 
Print this post

Is it possible to have a bargraph - vertical or horizontal drawn on an LCd display in such a way that you can have a variable controlling the height or length that is filled in on the graph?

Similar to those shown on THIS Video on Youtube

I searched both manuals and couldn't find anything, and there is only a vague reference to it online in a post abut a Maximite which used the code [code]DrawHBar(x,y), val, colour, [BFS], val ranges from 0 to 100
DrawVBar(160,90),y/2.7,yellow,BFS
DrawHBar(210,160),x/4.8,green,BFS ' bargraph with box, fill, scale[/code]

However on searching the manual I cannot find a mention of the "DrawVBar" or DrawHBar" commands
 
centrex

Guru

Joined: 13/11/2011
Location: Australia
Posts: 320
Posted: 10:41pm 20 Jul 2016
Copy link to clipboard 
Print this post

Surely those two commands are sub routines within the main program that should show it was done.
Cliff
 
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1702
Posted: 11:27pm 20 Jul 2016
Copy link to clipboard 
Print this post

They don't seem to be
The program/post I saw is Here
I wonder if it's part of the code for Maximite that didn't go into the Micromite?
Edited by lew247 2016-07-22
 
Zonker

Guru

Joined: 18/08/2012
Location: United States
Posts: 767
Posted: 12:05am 21 Jul 2016
Copy link to clipboard 
Print this post

Hey Lew...

Both rectangular and radial bar graphs can be done on the MM... Segments are just small drawn rectangles... Radial bar graphs are drawn with triangles.. Peter had some code that can get you started...
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1667
Posted: 12:30am 21 Jul 2016
Copy link to clipboard 
Print this post

  centrex said   Surely those two commands are sub routines within the main program that should show it was done.


I'd take a stab at saying it's just a matter of drawing a box.

Pass the Percentage of scale to the Sub & draw it to the desired scale.

Bit like this.

[Code]
CLS
For N=1 To 100
H=MM.VRes*N/100
Y=MM.VRes-H1
Box 0,Y,40,H,,,RGB(red)
Pause 100
Next N
[/code]

Cheers.
 
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1702
Posted: 08:33am 22 Jul 2016
Copy link to clipboard 
Print this post

My micromite is broken at the moment so I can't try it till next week, but I'll give it a go as soon as I can
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025