You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/hardware/03.nano/boards/nano-matter/tutorials/getting-started-matter-display/getting-started-matter-display.md
+97-2Lines changed: 97 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -838,10 +838,105 @@ With the Weather Station properly commissioned, now you can deploy it on an inte
838
838
839
839
## Nano Matter Display Sensors and Actuators
840
840
841
+
In the following sections we are going to highlight some of the Nano Matter Display main features and learn how to use them.
842
+
841
843
### E-ink Display
842
844
843
-
- Text
844
-
- Orientation
845
+
The API basic functions to control the E-ink display are shown below.
846
+
847
+
- Define the screen object using the Pervasive Displays class and initialize it:
Replace the `<screen-name>` with a custom designation of your display for further usage. For this guide we are going to use `EPD`.
855
+
856
+
#### Screen Orientation
857
+
858
+
**Orientation options:**
859
+
860
+
-`0`: default
861
+
-`1`: right rotated
862
+
-`2`: reverse default
863
+
-`3`: left rotated
864
+
-`6`: ORIENTATION_PORTRAIT
865
+
-`7`: ORIENTATION_LANDSCAPE
866
+
867
+
Define the screen orientation using the following function:
868
+
869
+
```arduino
870
+
EPD.setOrientation(7);
871
+
```
872
+

873
+
874
+
#### Text
875
+
876
+
To display text on the E-ink screen you need to define different screen parameters such as **font**, **orientation**, the **string** to be shown and its **color**.
877
+
878
+
**Fonts available:**
879
+
880
+
-`Font_Terminal6x8`
881
+
-`Font_Terminal8x12`
882
+
-`Font_Terminal12x16`
883
+
-`Font_Terminal16x24`
884
+
885
+
Define the font using the following function:
886
+
887
+
```arduino
888
+
EPD.selectFont(Font_Terminal8x12);
889
+
```
890
+
891
+
**Text writing:**
892
+
893
+
Display text using the `gText` function, pass the coordinates and string:
EPD.flush(); // update the screen to show the text on buffer
904
+
```
905
+
906
+
**Colors:**
907
+
908
+
The `gText` function also admits color definition for the text and the screen background. These are the available colors for this **Monochrome** display:
909
+
910
+
-`myColours.black`: default
911
+
-`myColours.white`: use when background color is not _white_
912
+
-`myColours.gray`: simulates gray using black and white dots (not gray scale).
0 commit comments