Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Arduino.h>
- #include <SPI.h>
- #include <U8g2lib.h>
- /* Constructor */
- U8G2_SSD1306_64X48_ER_F_HW_I2C u8g2(U8G2_R0);
- /* u8g2.begin() is required and will sent the setup/init sequence to the display */
- void setup(void) {
- u8g2.begin();
- }
- /* draw something on the display with the `firstPage()`/`nextPage()` loop*/
- void loop(void) {
- u8g2.firstPage();
- do {
- u8g2.setFont(u8g2_font_saikyosansbold8_8u);
- u8g2.drawStr(0,20,"HELLO");
- u8g2.drawStr(0,30, "WORLD!");
- } while ( u8g2.nextPage() );
- delay(1000);
- }
Advertisement
Add Comment
Please, Sign In to add comment