Please find here my functions to print on a LCD text display (compatible Hitachi HD44780) up to 40 simultaneus bars
, 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.
- 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
- 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! 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! )