This file contains hidden or 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
| const int potPin = 26; // 可変抵抗のワイパー(中央の足)を接続するADCピン | |
| const int powerPin = 22; // 可変抵抗のVCC側に電源を供給するGPIOピン | |
| float smoothedValue = 0.0; | |
| const float alpha = 0.1; // 平滑化係数 (0.0 ~ 1.0)。小さいほど滑らかになるが反応が遅れる | |
| void setup() { | |
| Serial.begin(115200); | |
| pinMode(powerPin, OUTPUT); | |
| digitalWrite(powerPin, LOW); // 待機時は常にOFFにして劣化を防ぐ | |
| } |
This file contains hidden or 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
| 略称 | 中毒耐性 | 炎上耐性 | 体幹ガード | 弱打撃ダメ補正 | 突きダメ補正 | 強打撃ダメ補正 | 魔法HPダメ補正 | 炎HPダメ補正 | ガー貫HPダメ補正 | |
|---|---|---|---|---|---|---|---|---|---|---|
| 河原田直盛 | 150 | 200 | 0 | 1 | 1 | 1 | 1 | 1 | 0.6 | |
| 山内典膳 | 150 | 200 | 0 | 1 | 1 | 1 | 1 | 1 | 0.6 | |
| 山内重則 | 150 | 200 | 0 | 1 | 1 | 1 | 1 | 1 | 0.6 | |
| 松本内蔵佑 | 150 | 200 | 0 | 1 | 1 | 1 | 1 | 1 | 0.6 | |
| 山内式部利勝 | 150 | 200 | 0 | 1 | 1 | 1 | 1 | 1 | 0.6 | |
| 鬼庭主馬雅次 | 150 | 200 | 0 | 1 | 1 | 1 | 1 | 1 | 0.6 | |
| 仙雲 | 150 | 200 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | |
| ジラフ | 150 | 200 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | |
| 弥山院圓真 | 150 | 200 | 0 | 1 | 1 | 1 | 1 | 1 | 1 |
This file contains hidden or 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
| 略称 | 種類 | 体幹ダメ | 物理ダメ | ガー貫ダメ | 魔法ダメ | 炎ダメ | |
|---|---|---|---|---|---|---|---|
| 空中蹴り | 対下段 | 10 | 10 | 0 | 0 | 0 | |
| 突き | 突き | 20 | 120 | 0 | 0 | 0 | |
| 斬り | 斬り | 30 | 80 | 0 | 0 | 0 | |
| 空中攻撃 | 斬り | 10 | 20 | 0 | 0 | 0 | |
| 鉤縄攻撃1 | 斬り | 15 | 40 | 0 | 0 | 0 | |
| 鉤縄攻撃2 | 斬り | 15 | 80 | 0 | 0 | 0 | |
| しゃがみ攻撃 | 斬り | 30 | 40 | 0 | 0 | 0 | |
| しゃがみ攻撃床下 | 斬り | 10 | 20 | 0 | 0 | 0 | |
| ぶら下がり | 斬り | 5 | 10 | 0 | 0 | 0 |
This file contains hidden or 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 "Adafruit_TinyUSB.h" | |
| /* | |
| * Rotary Encoder A: PIN 14 | |
| * Rotary Encoder B: PIN 15 | |
| * Slide Volume 1: A0 | |
| * Slide Volume 2: A1 | |
| */ | |
| uint8_t const desc_hid_report[] = | |
| { |
This file contains hidden or 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 "Adafruit_TinyUSB.h" | |
| uint8_t const desc_hid_report[] = | |
| { | |
| TUD_HID_REPORT_DESC_KEYBOARD() | |
| }; | |
| Adafruit_USBD_HID usb_hid(desc_hid_report, sizeof(desc_hid_report), HID_ITF_PROTOCOL_NONE, 2, false); | |
| uint8_t previousValue; // 0-37 ただしループ中の上限は 36 |
This file contains hidden or 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 "Keyboard.h" | |
| uint8_t previousValue; | |
| uint16_t sensorValue; | |
| void setup() { | |
| Keyboard.begin(); | |
| sensorValue = analogRead(A2); | |
| sensorValue = constrain(sensorValue, 5, 1018); |
This file contains hidden or 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 os | |
| import time | |
| from slack_sdk import WebClient | |
| # トークンは環境変数に入れておくものとする | |
| client = WebClient(token=os.environ.get("SLACK_USER_OAUTH_TOKEN")) | |
| # チャンネル ID も実行時に与える方がいいかもしれない | |
| channel_id = "C1234567890" |
This file contains hidden or 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
| #!/usr/bin/python3 | |
| import random | |
| import numpy as np | |
| def setnpstate(rseed): | |
| np.random.seed(rseed) | |
| state = [int(s) for s in list(np.random.get_state()[1])] | |
| state.append(624) |
This file contains hidden or 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
| #!/usr/bin/python3 | |
| import argparse | |
| import os | |
| from PIL import Image | |
| from PIL import ImageDraw | |
| from PIL import ImageFont | |
| # need fix | |
| d8 = ('\u00c0\u00c1\u00c2\u00c8\u00ca\u00cb\u00cd\u00d3' |
This file contains hidden or 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
| #!/usr/bin/python3 | |
| import argparse | |
| import os | |
| from PIL import Image | |
| from PIL import ImageDraw | |
| from PIL import ImageFont | |
| def mkglyph(f, fnt, xof, yof): |