![]() |
Forum Index : Microcontroller and PC projects : Bargraph with LCD panel
Author | Message | ||||
lew247![]() Guru ![]() Joined: 23/12/2015 Location: United KingdomPosts: 1702 |
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: AustraliaPosts: 320 |
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 KingdomPosts: 1702 |
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? |
||||
Zonker![]() Guru ![]() Joined: 18/08/2012 Location: United StatesPosts: 767 |
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: AustraliaPosts: 1667 |
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 KingdomPosts: 1702 |
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 |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |