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.

arduinoでoled

Last updated at Posted at 2015-08-25

オークションで手に入れた、oledをarduino unoにつないで見ました。

写真

MVC-002S.JPG

回路図

old.PNG

サンプルコード

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

# define OLED_RESET 		4
Adafruit_SSD1306 display(OLED_RESET);
# define XPOS 			0
# define YPOS 			1
# define DELTAY 			2

void setup()
{
	display.begin(SSD1306_SWITCHCAPVCC, 0x3c);
	display.clearDisplay();
	display.display();
	display.setTextColor(WHITE);
}

void loop()
{
	display.clearDisplay();
	display.setTextSize(2);
	display.setCursor(0, 0);
	display.print("Display 1");
	display.setCursor(0, 25);
	display.setTextSize(4);
	display.print("Hello");
	display.display();
}

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?