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
// 赤外線リモコンを受信し、シリアルにjson形式で出力する | |
#define NUM_MAX 300 //配列要素数 | |
#define TIMEOUT 20000 //無受信時のタイムアウトμs | |
#define IR_PIN 2 //受信モジュール出力の信号入力ピン | |
int time[NUM_MAX]; | |
int duMin; | |
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
// 赤外線リモコンを受信し、シリアルにjson形式とかで出力する | |
#include <Arduino.h> | |
#define CODE_MAX 16 // 解析結果(8bit)の最大個数 | |
#define NUM_MAX 160 // 作業容量 > (16+1)*8 | |
#define TIMEOUT 20000 // 無受信時のタイムアウトμs | |
#define IR_PIN 11 // 受信モジュール出力の信号入力ピン | |
// D11:MOSI を使うとISP用ピンのVcc,MOSI,GNDにまたがって挿すことができる | |
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 <Arduino.h> | |
#include "IRScanner.h" | |
IRScanner::IRScanner(uint8_t pin, uint8_t code_max) | |
{ | |
_pin = pin; | |
_code_max = code_max; | |
_work_max = (_code_max + 1) * 16; | |
_code_array = new uint8_t[_code_max]; | |
_work_array = new int16_t[_work_max]; |
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
// ==UserScript== | |
// @name Pixiv fix bookmark-tag sort | |
// @namespace https://www.pixiv.net/ | |
// @version 0.1 | |
// @description ブックマークタグの並びを名前順↑にする | |
// @author b2ox | |
// @match https://www.pixiv.net/bookmark_add.php* | |
// @grant none | |
// ==/UserScript== | |
'use strict'; |
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
// Usage: deno run --allow-run git-mgft.ts from to | |
// fromをtoにマージする | |
import * as git from './git.ts' | |
async function main(): Promise<number> { | |
if (Deno.args.length < 2) { | |
console.error('Usage: git-mgft from to'); | |
return -1 | |
} |
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
;; 色の管理を開いて詳細設定タブの再読み込み(&R)を実行して閉じる | |
myWait := 250 | |
Run, colorcpl.exe, , , myProc | |
Process, Wait, % myProc, 3 | |
If (ErrorLevel <> 0) { | |
Sleep myWait | |
Send, +^{TAB} | |
Sleep myWait | |
Send, !R | |
Sleep myWait |
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 board | |
from kmk.keys import KC | |
from kmk.kmk_keyboard import KMKKeyboard | |
from kmk.modules.layers import Layers | |
from kmk.matrix import DiodeOrientation | |
from kmk.hid import HIDModes | |
import kmk.extensions.keymap_extras.keymap_jp | |
hhkb = KMKKeyboard() | |
hhkb.modules.append(Layers()) |
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 time | |
#import neopixel | |
from pioasm_neopixel_bg import NeoPixelBackground | |
# https://learn.adafruit.com/intro-to-rp2040-pio-with-circuitpython/advanced-using-pio-to-drive-neopixels-in-the-background | |
from kmk.modules import Module, InvalidExtensionEnvironment | |
from kmk.keys import ModifierKey | |
class NPXStatus(Module): |
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
from kmk.hid import HIDModes | |
from cool640 import KMKKeyboard | |
if __name__ == '__main__': | |
try: | |
keeb = KMKKeyboard() | |
keeb.debug_enabled = True | |
keeb.go(hid_type=HIDModes.USB) #Wired USB enable | |
except OSError: | |
import supervisor |
OlderNewer