Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Arduino.h>
- #include <U8g2lib.h>
- #ifdef U8X8_HAVE_HW_SPI
- #include <SPI.h>
- #endif
- #ifdef U8X8_HAVE_HW_I2C
- #include <Wire.h>
- #endif
- U8G2_ST7920_128X64_1_SW_SPI u8g2(U8G2_R0, /* clock=*/ 14, /* data=*/ 13, /* CS=*/ 12, /* reset=*/ 2);
- void setup(void) {
- u8g2.begin();
- }
- void loop(void) {
- u8g2.firstPage();
- do {
- u8g2.setFont(u8g2_font_ncenB10_tr);
- u8g2.drawStr(0, 24, String(millis()).c_str());
- } while ( u8g2.nextPage() );
- delay(1000);
- }
Add Comment
Please, Sign In to add comment