Skip to content

Instantly share code, notes, and snippets.

#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() {
#include <M5Stack.h>
#define LED_PIN 16 // 16番ピンにLED接続
void setup() {
M5.begin(); // Initialize the M5Stack object
pinMode(LED_PIN, OUTPUT);
}
// Add the main program code into the continuous loop() function
void loop() {
#include <M5Stack.h>
#define LED_PIN 16 // 16番ピンにLED接続
// the setup routine runs once when M5Stack starts up
void setup(){
M5.begin(); // Initialize the M5Stack object
pinMode(LED_PIN, OUTPUT);
}
// the loop routine runs over and over again forever
#include <M5Stack.h>
// the setup routine runs once when M5Stack starts up
void setup(){
// Initialize the M5Stack object
M5.begin();
// LCD display
M5.Lcd.println("Hello World");
#define OnB_LED 2
boolean togLED = false;
volatile int timeCounter1;
hw_timer_t *timer1 = NULL;
portMUX_TYPE timerMux = portMUX_INITIALIZER_UNLOCKED;
void IRAM_ATTR onTimer1(){
portENTER_CRITICAL_ISR(&timerMux);
/* ESP32でLCDに文字表示
*
*/
#include <LiquidCrystal.h>
LiquidCrystal lcd(32,25,26,27,14,13);
void setup()
{