Skip to content

Instantly share code, notes, and snippets.

void setup() {
pinMode(11, OUTPUT);
}
void loop() {
digitalWrite(11, HIGH);
delay(1000);
digitalWrite(11, LOW);
delay(1000);
}
//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の行と列を設定
/* ESP32でLCDに文字表示
*
*/
#include <LiquidCrystal.h>
LiquidCrystal lcd(32,25,26,27,14,13);
void setup()
{
#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);
#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");
#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