Difference between revisions of "ArduinoNano 096OLED.ino"

From
Jump to: navigation, search
(Created page with "<pre> #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_SSD1306_128X64 NONAHE_F...")
 
Line 10: Line 10:
 
#endif
 
#endif
  
U8G2_SSD1306_128X64 NONAHE_F_SW_I2C u8g2(U8G2 RO,A5,A4,U8X8_PIN NONE);
+
U8G2_SSD1306_128X64 NONAME_F_SW_I2C u8g2(U8G2_RO,A5,A4,U8X8_PIN_NONE);
  
 
void setup(void) {
 
void setup(void) {

Revision as of 22:04, 13 December 2024

#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_SSD1306_128X64 NONAME_F_SW_I2C u8g2(U8G2_RO,A5,A4,U8X8_PIN_NONE);

void setup(void) {
  u8g2.begin();
}

void loop(void) {
  u8g2.clearBuffer();
  u8g2.setFont(u8g2_font_ncenB08_tr);
  u8g2.drawStr(0,10,"ideaspark 0.96" OLED");
  u8g2.drawStr(0,25,"0.96");
  u8g2.drawStr(0,35,"0.96 inch");
  u8g2.drawStr(0,45,"0.96 inch OLED");
  u8g2.drawStr(0,55,"0.96 inch OLED 128x64");
  u8g2.sendBuffer();
  delay(1000);
}