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 <Arduino.h> | |
#include <IRremoteESP8266.h> | |
#include <IRsend.h> | |
#include <M5Unified.h> | |
#ifndef USE_USEBSERIAL | |
#define USBSerial Serial | |
#endif | |
static uint16_t kIrLed = 4; |
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
/* | |
* IRremoteESP8266: IRrecvDumpV2 - dump details of IR codes with IRrecv | |
* An IR detector/demodulator must be connected to the input kRecvPin. | |
* | |
* Copyright 2009 Ken Shirriff, http://arcfn.com | |
* Copyright 2017-2019 David Conran | |
* | |
* Example circuit diagram: | |
* https://github.com/crankyoldgit/IRremoteESP8266/wiki#ir-receiving | |
* |
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
import SwiftUI | |
import CoreData | |
struct ContentView: View { | |
@Environment(\.managedObjectContext) private var viewContext | |
@FetchRequest( | |
sortDescriptors: [NSSortDescriptor(keyPath: \Item.timestamp, ascending: true)], | |
animation: .default) | |
private var items: FetchedResults<Item> |
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 <Arduino.h> | |
#include <FastLED.h> | |
#define LED_PIN 21 | |
#define NUM_LEDS 1 | |
static CRGB leds[NUM_LEDS]; | |
void setLed(CRGB color) { | |
// change RGB to GRB |
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
import SwiftUI | |
struct ModelView: View { | |
@ObservedObject var model: Model | |
@State var isEditing = false | |
var body: some View { | |
HStack { | |
Text(model.name) |
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
import SwiftUI | |
struct ContentView: View { | |
@ObservedObject var model = Model() | |
var body: some View { | |
VStack { | |
Toggle("On/Off", isOn: $model.isOn) | |
Spacer() | |
Button("Undo") { |
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
Hello, I'm an instance of A. | |
Hello, I'm an instance of A. | |
Hello, I'm an instance of B. | |
Hello, I'm an instance of B. |
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
// | |
// ContentView.swift | |
// TextFieldPractice | |
// | |
// Created by Katsuyoshi Ito on 2023/01/10. | |
// | |
import SwiftUI | |
// CoreDataを想定してOptionalを扱うモデルを用意 |
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> | |
#include <stdlib.h> | |
#include "EPD_1in9.h" | |
//////////////////////////////////////full screen update LUT//////////////////////////////////////////// | |
unsigned char DSPNUM_1in9_on[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, }; // all black | |
unsigned char DSPNUM_1in9_off[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; // all white | |
unsigned char DSPNUM_1in9_WB[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, }; // All black font | |
unsigned char DSPNUM_1in9_W0[] = {0x00, 0xbf, 0x1f, 0xbf, 0x1f, 0xbf, 0x1f, 0xbf, 0x1f, 0xbf, 0x1f, 0xbf, 0x1f, 0x00, 0x00, }; // 0 |
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
#ifndef __ENV_H__ | |
#define __ENV_H__ | |
#define WIFI_SSID "your wifi ssid" | |
#define WIFI_PASSWORD "your password for WIFI_SSID" | |
//#define WIFI_SSID_2 "your second wifi ssid if you have" | |
//#define WIFI_PASSWORD_2 "your password for WIFI_SSID2" | |
//#define WIFI_SSID_3 "your third wifi ssid if you have" | |
//#define WIFI_PASSWORD_3 "your password for WIFI_SSID3" |