here a update
1- moved the const to progmem (thanks to Erel) This saves you aprx 460b of RAM
2-Putstring now returns the actual x pointer, so you use this as start for next write (for example multiple writings instead of using Jointstring)
B4R version: 1.20
Parsing code. (0.01s)
Compiling code. (0.01s)
Building project (0.01s)
Compiling & deploying Ino project (Arduino/Genuino Mega or Mega 2560 - COM3) Error
Could not find file 'D:\Programs\B4R\NOKIA_TEST\Objects\src\src'.
I think I deleted the post by mistake instead of edit it, however, it works now i forgot to edit AppStart sub
May I ask, how to set space between characters?
Thanks
well i think I got it
B4X:
Sub PutString(x As Byte, y As Byte, pcbuff() As Byte) As Byte
Dim n=pcbuff.length As Byte
Dim r=0 As Byte
Do While(n>r)
PutChar(x, y, (pcbuff(r)))
r = r + 1
x = x + 6 'adjust space between chars, now we have space ;)
Loop
Return x
End Sub
Hello,
kindly allow me to share this modified version.
1) New backlight control pin (added), connect LCD backlight pin to Arduino pin (7), backlight is controlled by PWM
2) you can call InitN5110 with two parameters to init LCD and adjust contrast and backlight
3) One dot space between characters
4) Clear removed from InitN5110 sub
5) Pin initialization moved to AppStart sub
Hello,
Now you can load images to Nokia 5110 LCD, just generate image bitmap array by LCD assistance then copy the resulting array elements to your Arduino code, to modify B4RImage Array elements(requires adding line-continuation characters, space and underscore) then call LoadImageArray sub, that's it
This example loads 'B4R' image to LCD
Note: byte counting index should be 0 to 503, not 504 (modified)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.