Announcement

Collapse
No announcement yet.

how to make a bargraph

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to make a bargraph





    first you make a bitmap for every value from the bargraph or number you like to show.

    then you upload them to a µsd card using the graphicscomposer.
    check the result txt for the location from the bmp's and the adress jump for every bmp.
    then you write the program to show a bmp @ a value

    adres:=8556 +(dig*17); // calculate adres pointer


    for this case the start adress for this bmp is at 8556
    and every bmp takes 17 adress locations (blocks)

    //==================================================================================================
    func Front(var dig)
    var adres;
    if (dig12)
    dig:=12;
    endif

    adres:=8556 +(dig*17); // calculate adres pointer
    uSD_SetSector(0x0000, adres); // set sector
    uSD_Image(190, 232);
    endfunc
    //==================================================================================================

    this code shows the front wheel suspention bargraph @ location 190,232

    the var dig can be from 0 to 12


    in the main you just call

    Front(bar);

    and the var "bar" 0-12 will be displayed as a bargraph.

    easy as this
    by the way, pleasy don't use my graphics, it hase taking me 3 months to draw them.
    for exampel, the main image is 5669X7559 pixels and 122Mb
    I like to draw in details.


    this is a small part from the image.
    pixel by pixel handcrafted...





    Attached files
    µLCD-70DT & Arduino DUE

  • #2


    Indeed, this is exactly the way I'm drawing stuff on the uOLED displays.
    It allows me to get a more defined, shaded picture with smoothed edges using anti-aliasing.
    It's also pretty quick too!

    I've used sub-sections to display any font/any size/any colour as a readout.
    The best thing is that they take up so little space on a 2Gb card.

    Good work!

    Comment


    • #3


      great work, I tried to create also some digits of my own, but its hard work.
      Cheers
      Walter

      Comment


      • #4


        Hi Peter,
        for exampel, the main image is 5669X7559 pixels and 122Mb
        I am looking at doing a similar thing, the question I have is why you have to draw in such a high resolution when the display resolution is only 320x240?

        Regards,
        Bobby

        Comment

        Working...
        X