• I just tried an original Espruino board and the code I posted above does work for me. Is there something else that isn't working for you?

    Have a look at http://www.espruino.com/Reference#l_Graphics_setFontAlign

    setFontAlign is new, but basically it defines how subsequent calls to drawString(txt,x,y) will align the text to x,y. In your example you've left x&y out, so it'll be using 0,0 as the centre, hence the apparent -2,-2.

    You probably wanted:

    leds.setFontAlign(0,0,0);
    leds.drawString("1",leds.getWidth()/2,leds.getHeight()/2);
    
About

Avatar for Gordon @Gordon started