Pages: [1]   Go Down
Author Topic: Bargraph Meters for LCD, horizontal, vertical, peak memory, linear and log !  (Read 328 times)
0 Members and 2 Guests are viewing this topic.
Offline Offline
Newbie
*
Karma: 1
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Please find here my functions to print on a LCD text display (compatible Hitachi HD44780) up to 40 simultaneus bars smiley-eek-blue, with different positions, lengths, linear progression or audio logarithmic, with/without peak memory display.
They can be used as progression bars, level meters, audio VUmeters, visually show any measurement or level you like to.

Types of bars can be mixed but all must only be horizontal OR vertical. This is due to display's customized characters limitation, so I was forced to write one function for horizontal bars/meters and another for vertical ones giving priority to the precision of the bars.

Main features:
  • easy to embed in your projects, it doesn't use delays or delay loops in order to take the shortest CPU time possible and free CPU for your main application
  • precise: it uses every dot of the display
  • linear and audio logarithmic option, just with a parameter
  • HORIZONTAL bars: peak indicator memory option in the same bar with expiration time adjustment
  • VERTICAL bars: peak or standard bars: due to custom characters limitations it's not possible to have a cool bar like the horizontal ones  smiley-confuse
  • it works with different display sizes (eg. 16x2 20x4)
  • direct connection Arduino==display, no need of a serial converter in the middle
  • it uses standard Arduino libraries

Is your task obviously to check that position and maximum length of each bar stay inside the display... :-)

Below images and codes, enjoy free, I will appreciate comments and see projects using them!  smiley-grin


Example of several bars showing a typical stereo L-R audio logarithmic VUmeters, with peak memory, two different sizes: 3 in the top, 17 below.
In the middle one linear bar, length 17, without peak memory (but it can be activated).




Example using the VER version, showing 10 audio logarithmic bars, lengh 2 with sidebar peak memory. One linear peak bar, length 4. Two audio logarithmic L-R VUmeters, length 4, with peak memory bars in the centre.


Enclosed below the codes for HORIZONTAL BARS and the one for VERTICAL BARS.

*** Updated 13 april with v 1.2 :
- better circuit description
- better comments

*** Updated 15 april VER only with v 1.3 :
- you can print peak bar only if you wish
                                           (if you like this post pls click my karma!  smiley-lol )

* NiceMetersHOR_1_2.ino (7.99 KB - downloaded 4 times.)
* NiceMetersVER_1_2.ino (7.71 KB - downloaded 5 times.)
* NiceMetersVER_1_3.ino (8.28 KB - downloaded 1 times.)
« Last Edit: April 15, 2014, 04:17:10 pm by Bob4us » Logged

DE
Offline Offline
God Member
*****
Karma: 20
Posts: 668
| Germany | NRW |
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thx for sharing  smiley
Logged

Dum spiro, spero - if you find my posting helpful, please click my Karma smiley
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Do you know A.R.T

Pages: [1]   Go Up
Jump to: