Skip to content

Commit d06fbc2

Browse files
committed
Update README.md
1 parent c670ecf commit d06fbc2

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

README.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,34 +15,38 @@ With minimal changes in configuration settings it shall support other LCD resolu
1515

1616
The library supports:
1717
1. Two image formats:
18-
-- Normal GFX (first pixel is top left corner, represented by bit0 in the first byte)
19-
-- Native NKK (first pixel is top right corner, represented by bit7 in the first byte, as per NKK specs)
18+
- Normal GFX (first pixel is top left corner, represented by bit0 in the first byte)
19+
- Native NKK (first pixel is top right corner, represented by bit7 in the first byte, as per NKK specs)
2020
2. Landscape (64x32) and Portrait (32x64) display configurations
2121
3. Two formats for background colour - three bytes RGB format and native NKK format (RRGGBBxx)
2222
4. A rotation of an image by 180 degrees to accommodate different possible footprints of an NKK device on your pcb.
2323

2424
## Library usage:
2525
1. Create a NKK_SmartDisplayLCD object. At this step specify:
26-
- w: The NKK LCD screen width in pixels. Maximum w is 256 and Maximum w x h/8 = 65535 for this library code.
27-
- h: The NKK LCD screen height in pixels Maximum h is 256 and Maximum w x h/8 = 65535 for this library code.
28-
- isRotate180: A flag to indicate that the picture need to be rotated by 180 degrees to accommodate different possible footprints of an NKK device on your pcb. Applied just before the picture is uploaded to the NKK device by the *display()* or *display_NKK()* functions.
29-
- cspin: Slave Select(Chip Select) signal (to allow use more than one NKK device with their own SS signals).
30-
- freqSPI: SPI frequency, Hz.
31-
- pointer: A reference (pointer) to native SPI object which handles SPI communications.
26+
- w: The NKK LCD screen width in pixels. Maximum w is 256 and Maximum w x h/8 = 65535 for this library code.
27+
- h: The NKK LCD screen height in pixels Maximum h is 256 and Maximum w x h/8 = 65535 for this library code.
28+
- isRotate180: A flag to indicate that the picture need to be rotated by 180 degrees to accommodate different possible footprints of an NKK device on your pcb. Applied just before the picture is uploaded to the NKK device by the *display()* or *display_NKK()* functions.
29+
- cspin: Slave Select(Chip Select) signal (to allow use more than one NKK device with their own SS signals).
30+
- freqSPI: SPI frequency, Hz.
31+
- pointer: A reference (pointer) to native SPI object which handles SPI communications.
32+
3233
2. Execute *begin()* method. That would start SPI interface and reset the NKK device.
34+
3335
3. Set required background colour and brightness:
34-
- By using library methods that would communicate directly to the NKK device:
36+
- By using library methods that would communicate directly to the NKK device:
3537
```C++
3638
setColourNKK(byte data); // set as per NKK specs (RRGGBBxx)
3739
setColourRGB(byte R, byte G, byte B); // RGB get converted to the closest colour as per NKK specs (64 colours available)
3840
setBrightness(byte data); //set as per NKK specs (BBBxxxxx)
3941
```
40-
- By setting library variables *bkgColour* and *bkgBrightnes* which will be used when the *display()* and *display_NKK()* methods are called
42+
- By setting library variables *bkgColour* and *bkgBrightnes* which will be used when the *display()* and *display_NKK()* methods are called
4143

4244
4. Set an image in a GFX or NKK format to library variables *imageBufferGFX[]* and *imageBufferNKK[]*. No need to set both.
4345
You can use an NKK Bitmap bilder (MS Excel file) in the */documentation* folder to build an image in GFX or NKK formats, landscape or portrait.
46+
4447
5. Use *drawPixel(x,y,color)* to set a pixel in the *imageBufferGFX[]*. X and Y are pixel coordunates, starting from 0. For this monochrome
4548
LCD display *color* can be any value, it will be converted either 0 or 1 in the library. This method is also used for integration with Adafruit_GFX library (https://github.com/adafruit/Adafruit-GFX-Library).
49+
4650
6. Execute *display()* or *display_NKK()* methods which will do the following:
4751
- upload an image to the NKK device from *imageBufferGFX[]* or *imageBufferNKK[]* and make the image visible.
4852
*display()* will use *imageBufferGFX[]* as a source and will overwrite *imageBufferNKK[]*.

0 commit comments

Comments
 (0)