Skip to content

Commit 1fed5a5

Browse files
authored
Refactor Inkplate instance and update method calls
1 parent ca1bdd9 commit 1fed5a5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

examples/Inkplate6/Advanced/IO/InternalExpander/InternalExpander.ino

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,25 +55,25 @@
5555
#define LED_PIN 15
5656

5757
// Create an instance of the Inkplate object
58-
Inkplate display;
58+
Inkplate inkplate(INKPLATE_1BIT);
5959

6060
void setup()
6161
{
6262
// Init Inkplate library and LVGL in PARTIAL render mode
63-
display.begin(LV_DISP_RENDER_MODE_PARTIAL);
63+
inkplate.begin(LV_DISP_RENDER_MODE_PARTIAL);
6464

6565
// Set P1-7 (GPB7) as output on the *internal* IO expander
6666
// Only pins 9–15 are safe to use on the internal expander.
67-
display.internalIO.pinMode(LED_PIN, OUTPUT);
67+
inkplate.internalIO.pinMode(LED_PIN, OUTPUT);
6868
}
6969

7070
void loop()
7171
{
7272
// Set output to LOW (LED off)
73-
display.internalIO.digitalWrite(LED_PIN, LOW);
73+
inkplate.internalIO.digitalWrite(LED_PIN, LOW);
7474
delay(1000); // Wait for one second
7575

7676
// Set output to HIGH (LED on)
77-
display.internalIO.digitalWrite(LED_PIN, HIGH);
77+
inkplate.internalIO.digitalWrite(LED_PIN, HIGH);
7878
delay(1000); // Wait for one second
7979
}

0 commit comments

Comments
 (0)