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
void setup() { | |
pinMode(11, OUTPUT); | |
} | |
void loop() { | |
digitalWrite(11, HIGH); | |
delay(1000); | |
digitalWrite(11, LOW); | |
delay(1000); | |
} |
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
//1602 LCD 文字表示 | |
#include <LiquidCrystal.h> | |
// PIN割り当ての構文は以下の通り | |
// LiquidCrystal(rs, enable, d4, d5, d6, d7) | |
// ということで、rs:7 enable:8 d4:9 d5:10 d6:11 d7:12 に割り当て | |
LiquidCrystal lcd(7, 8, 9, 10, 11, 12); | |
void setup() { | |
// LCDの行と列を設定 |
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() | |
{ |
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
#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
/*********************************************/ | |
/* 最もシンプルな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
#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
#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 |
OlderNewer