Good morning, Larry. I downloaded you lib from GitHub and would like to ask You for a small tutorial for your library 'cause it even does not compile with your sketch above.
I copied an Arduino directory into libraries and renamed it into uc1701.
So, the issues are:
0. The function uc1701Init requires a iClock parameter in according to its' definition in uc1701.cpp:
int uc1701Init(int iDC, int iReset, int iLED, int iCS, byte bFlip180, byte bInvert, int32_t iClock)
What is iClock? Is it a speed for SPI bus? What value could You suggest for JLX12864G display as on picture above?
1. There is a difference between definitions of the function uc1701WriteString in uc1701.h and uc1701.cpp:
uc1701.h:
// Draw a string of normal (8x8), small (6x8) or large (16x24) characters
// At the given col+row
//
int uc1701WriteString(int x, int y, char *szMsg, int bInverted, int iSize);
uc1701.cpp:
// Draw a string of small (8x8) or large (16x24) characters
// At the given col+row
int uc1701WriteString(int x, int y, char *szMsg, int iSize, int bInverted)
The bInverted and iSize parameters are interchanged and there are different descriptions for the small and the normal fonts.
Do I have to change their order in .h or .cpp file? Or it's OK?
2. Finally, I tried to compile a little sketch, but it returns me a message while compiling:
C:\Users\I8A8B~1.MAT\AppData\Local\Temp\arduino_modified_sketch_715290\sketch_jul25a.ino: In function 'void setup()':
C:\Users\I8A8B~1.MAT\AppData\Local\Temp\arduino_modified_sketch_715290\sketch_jul25a.ino:17:59: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
uc1701WriteString(0, 0, "Hello World!", false, FONT_NORMAL);
Is it OK?
---------------------
Best regards.
Russian PCDeath
uc1701.cpp uc1701.h