Software Code
Open Arduino IDE.
Install the
U8g2 library: Navigate to Sketch -> Include Library -> Manage Libraries…
and Search for the keyword “
U8g2” in the Library Manager, then install.
Copy the following code, click Verify to check for syntax errors. Verify that there are no
errors, and you can upload the code.
#include <Arduino.h>
#include <U8x8lib.h>
U8X8_SSD1306_128X64_ALT0_HW_I2C
u8x8
(
/* reset=*/
U8X8_PIN_NONE);
void
setup
(
void
)
{
u8x8.begin();
u8x8.setFlipMode(
1
);
}
void
loop
(
void
)
{
u8x8.setFont(u8x8_font_chroma48medium8_r);
u8x8.setCursor(
0
,
0
);
u8x8.print(
"Hello World!"
);
}
43
Grove Beginner Kit For Arduino
®
Содержание Grove Beginner Kit
Страница 1: ...Grove Beginner Kit For Arduino User Manual ...
Страница 63: ...62 Grove Beginner Kit For Arduino ...