Created
March 19, 2020 09:44
-
-
Save takataka5614/fa93ee42936774a7ad9e58fc31cec975 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Wire.h" //OLEDとI2C接続するためのライブラリを読み込む | |
#include "SSD1306.h" //OLEDとやり取りするためのライブラリを読み込む | |
#define SDA 22 //SDAをGPIOの22へ | |
#define SCL 18 //SCLをGPIOの18へ | |
SSD1306 display(0x3c, SDA, SCL); //0x3cはI2Cアドレス | |
void setup() { | |
display.init(); //ディスプレイを初期化 | |
display.drawString(0, 0, "Hello World from ESP32!"); | |
display.display(); //指定された文字を描く | |
} | |
void loop() {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment