Menu

GLCDPrint vs. GLCDDrawString

Help
bed
2017-09-19
2017-09-25
  • bed

    bed - 2017-09-19

    Possible a naive question:
    What is the difference between

    GLCDPrint ( 1,1, "PrintStr")  ; Print some text
    GLCDDrawString( 1,1,"DrawStr") ; Draw some text
    

    using ssd1306

     
  • Anobium

    Anobium - 2017-09-19

    One handles number and strings. The other just strings.

     
  • bed

    bed - 2017-09-19

    ahh, thanx again, sorry for wrong forum.

     
  • bed

    bed - 2017-09-24

    So i take this to the FAQ:

    Q: What is the Difference between  GLCDPrint and GLCDDrawString?

    A: GlcdPrint can print Variables, GLCDDrawString can print only Strings. You can minimize Code if you are only use one kind.

     
  • stan cartwright

    stan cartwright - 2017-09-24

    "Q: What is the Difference between GLCDPrint and GLCDDrawString?
    A: GlcdPrint can print Variables, GLCDDrawString can print only Strings. You can minimize Code if you are only use one kind."
    ;
    I think this is now confusing . How minimise code if only one type works??
    GlcdPrint can print str(var)...where that fit in? Also is GlcdDrawChar better than GlcdDrawString if the string is only one char. just a thought

     
  • bed

    bed - 2017-09-25

    Hhm, Help forGlcdDrawChar says:"CharCode is the ASCII number of the character to display."
    So it is different.
    Yes I could ommit the advice for minimizing code. Its to special.
    Of course it is the possibility to saving compiled code minimal.
    Lets asume you do have a small program which display one 2 texts in Display in dependence of a sensor.
    Like if temp < 0 then "Its frozen" else "not Frozen"
    here you dont need GLCDPrint . Here is GLCDDrawString good enough and save a few byte,
    because the Routine of GLCDDrawString don't have the code for displaying variables it is smaller.

     
  • stan cartwright

    stan cartwright - 2017-09-25

    I think speed is more important than memory.
    Chips I use have plenty of memory but faster is always better.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.