Skip to content

Instantly share code, notes, and snippets.

View katsuyoshi's full-sized avatar

Katsuyoshi Ito katsuyoshi

  • ITO SOFT DESIGN Inc.
  • Akita, Japan
View GitHub Profile
@katsuyoshi
katsuyoshi / ContentView.swift
Created September 29, 2024 16:19
If the alert isn’t shown, set the show flag later. I guess the alert view hides behind some view when the view creates complexity.
import SwiftUI
struct ContentView: View {
@State var isPresented = false
var body: some View {
VStack {
Image(systemName: "globe")
.imageScale(.large)
.foregroundStyle(.tint)
Text("Hello, world!")
@katsuyoshi
katsuyoshi / index.haml
Created June 14, 2024 23:20
外部データ読み込みテスト
require 'sinatra'
require 'sinatra/reloader' if development?
require 'haml'
before do
response.headers['Access-Control-Allow-Origin'] = 'https://irboard.itosoft.com'
end
get '/' do
haml :index
@katsuyoshi
katsuyoshi / How to run
Created December 17, 2023 09:19
Learning racc
% racc parser.y -o parser.rb
% ruby parser.rb
1+2-3*4/5
require 'plc_access'
plc = PlcAccess::Protocol::Mitsubishi::McProtocol.new host:"192.168.0.10"
plc["M0"] = true
plc["M0"] # => true
plc["M0", 10] # => [true, false, ..., false]
plc["D0"] = 123
plc["D0"] # => 123
@katsuyoshi
katsuyoshi / main.cpp
Created October 3, 2023 09:21
M5Stack StampS3 Project on PlatformIO
#include <Arduino.h>
void setup() {
Serial.begin(115200);
}
void loop() {
Serial.print(".");
delay(1000);
}
@katsuyoshi
katsuyoshi / README.md
Last active October 8, 2023 16:11
DXOpalのテスト
@katsuyoshi
katsuyoshi / main.cpp
Last active April 13, 2023 23:30
LoRaモジュール評価ボード E220-900T22S(JP)-EV1の伝送レート変更。M5Atom Lite使用
#include <Arduino.h>
#include <M5Unified.h>
#define LORA_M0_PIN 21
#define LORA_M1_PIN 25
#define LORA_RX_PIN 23
#define LORA_TX_PIN 19
#define BAUDRATE_1200 0x00
@katsuyoshi
katsuyoshi / main.cpp
Last active April 13, 2023 14:20
LoRaモジュール評価ボード E220-900T22S(JP)-EV1を使ったLoRa通信受信側 M5AtomLite使用
#include <Arduino.h>
#include <M5Unified.h>
#include <WiFi.h>
#include <HTTPClient.h>
#include <FastLED.h>
#define LED_PIN 27
#define NUM_LEDS 1
#define LORA_M0_PIN 21
@katsuyoshi
katsuyoshi / main.cpp
Last active March 27, 2023 00:05
LoRaモジュール評価ボード E220-900T22S(JP)-EV1を使ったLoRa通信送信側 M5AtomS3使用
#include <Arduino.h>
#include <M5Unified.h>
#include <string.h>
#define LORA_RX_PIN 7
#define LORA_TX_PIN 6
#define GPS_RX_PIN 38
#define GPS_TX_PIN 39
#define REC_BUF_SIZE 128
import UIKit
import PlaygroundSupport
import Combine
class MyViewController : UIViewController {
var label: UILabel!
var sub: AnyCancellable!
override func loadView() {