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() { | |
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 <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 |
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 <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"); |
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
/*********************************************/ | |
/* 最もシンプルなLチカ */ | |
/*********************************************/ | |
#define OnB_LED 2 | |
void setup() { | |
pinMode(OnB_LED, OUTPUT); | |
} | |
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
#define OnB_LED 2 | |
int LedState = 0; | |
unsigned long previousMillis = 0; | |
void setup() { | |
pinMode(OnB_LED, OUTPUT); | |
} | |
void loop() |
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
#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); |
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
/* ESP32でLCDに文字表示 | |
* | |
*/ | |
#include <LiquidCrystal.h> | |
LiquidCrystal lcd(32,25,26,27,14,13); | |
void setup() | |
{ |
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
/* ボード上のLEDをブリンク | |
* ESP32 LED Blink | |
* | |
* ON Board LED GPIO 2 | |
*/ | |
#define LED 2 // このピンNo.を変更すればボード外のLEDを点滅 | |
void setup() | |
{ |
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
/* ESP32 で LCD に文字表示 | |
* | |
*/ | |
#include <LiquidCrystal.h> | |
LiquidCrystal lcd(32,25,26,27,14,13); | |
void setup() | |
{ |
NewerOlder