0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

wemos d1でoled

Last updated at Posted at 2018-05-05

概要

wemos d1でoledやってみた。

写真

MVC-006F.JPG

回路図

wemos.JPG

サンプルコード

# include <SPI.h>
# include <Wire.h>
# include <Adafruit_GFX.h>
# include <Adafruit_SSD1306.h>

Adafruit_SSD1306 oled(16);

void setup()
{
	Serial.begin(115200);
	Serial.println("\nok");
	oled.begin(SSD1306_SWITCHCAPVCC, 0x3c);
	oled.clearDisplay();
	oled.display();
	oled.setTextColor(WHITE);
	oled.setTextSize(2);
	oled.setCursor(0, 0);
	oled.print("oled 1");
	oled.display();
}
void loop()
{
	oled.clearDisplay();
	oled.setTextSize(2);
	oled.setCursor(0, 0);
	oled.print("oled 1");
	oled.setCursor(0, 25);
	oled.setTextSize(4);
	oled.print("Hello");
	oled.display();
	delay(500);
	Serial.println("\nok");
}

以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?