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
| /* | |
| * ATOM Lite/MatrixをBLEキーボードにして,特定の文字列を送付する。 | |
| * | |
| * 例えば,決まったWi-FiのSSIDに対するパスワードを送るといった用途に使えます。 | |
| * | |
| */ | |
| #include <BleKeyboard.h> // https://github.com/T-vK/ESP32-BLE-Keyboard | |
| #include <M5Atom.h> |
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 <M5Core2.h> | |
| #include <WiFi.h> | |
| const char* SSID = "SSID"; | |
| const char* PASSWORD = "SSID Password"; | |
| const char* NTP_SERVER = "ntp.jst.mfeed.ad.jp"; | |
| const char* TZ = "JST-9"; | |
| const uint8_t FONT_NUMBER = 2; // 16px ASCII Font | |
| const uint8_t FONT_SIZE = 16; |
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
| /* | |
| * ATOM LiteをBLEキーボードにして,定期的にキーを送ることで | |
| * スクリーンセーバーを起動しないようにする。 | |
| * | |
| * KILL_INTERVAL_SEC: 定期的にキーを送る頻度(秒) | |
| * KILL_KEY: 定期的に送るキー | |
| * | |
| * ATOM Liteのボタンを押すことで,SEND_KEYに設定されたキーを | |
| * 送る。 | |
| * |
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
| /* | |
| * ATOM Lite/MatrixをBLEキーボードにするサンプルプログラム | |
| * | |
| * 送信するキーを変更するにはSEND_KEYの値を変更してください。 | |
| * | |
| * コンパイルにはESP32 BLE Keyboard library(https://github.com/T-vK/ESP32-BLE-Keyboard)が必要です。 | |
| * 事前にインストールしておいてください。 | |
| */ | |
| #include <BleKeyboard.h> // https://github.com/T-vK/ESP32-BLE-Keyboard |
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
| /* | |
| ATOM Lite を BLE マウスにして,定期的にマウスカーソルを | |
| 動かすことでスクリーンセーバーを起動しないようにする。 | |
| https://github.com/T-vK/ESP32-BLE-Mouse を Arduino IDE に | |
| インストールしておくこと。 | |
| 1. ATOM Liteにプログラムを書き込む。 | |
| 2. プログラムを起動する。 | |
| 3. ATOM Lite BLE Mouseとペアリングする。 |
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 <M5StickC.h> | |
| #define PIR_PIN 36 | |
| #define PIR_DETECTION_DELAY_MSEC 2000 | |
| #define FILL_MSEC 500 | |
| #define TIMER_MSEC 30000 | |
| bool startTimer(unsigned long ms) { | |
| for (int y = M5.Lcd.height() - 1; y >= 0; --y) { |
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
| # -*- code: utf-8 -*- | |
| # | |
| # python rename.py [-c|--count count] [-d|--dir directory] [-n|--dry-run] [-t|--timestamp] regex target | |
| # | |
| # count: 連番の開始番号。デフォルトは0 | |
| # directory: リネームするファイルがあるディレクトリ | |
| # regex: リネームするファイルにマッチする正規表現 | |
| # target: 文字列のformatと同じ書式。引数の0番目は連番,1番目以降は前方参照の値が入る | |
| # | |
| # python rename.py 'filename-(\w+).jpg' 'hoge-{1}-{0:0>4}.txt' |
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
| #!/bin/env python | |
| # | |
| # aibo Developer Site: https://developer.aibo.com/jp/home | |
| # https://developer.aibo.com/jp/docs#api-%E3%81%AE%E5%AE%9F%E8%A3%85%E4%BE%8B を書き替えてみた | |
| # | |
| # 環境変数「AIBO_TOKEN」にトークンを設定 | |
| # 環境変数「AIBO_DEVICE_ID」に aibo のデバイス ID を設定(一匹前提) | |
| # | |
| import json | |
| import os |
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
| javascript:(function() { | |
| const promptTitle = 'ScrapboxLink'; | |
| let prompt; | |
| if (window.location.href.startsWith('https://www.amazon.co.jp')) { | |
| const isKindle = window.location.href.indexOf('-ebook') > 0; | |
| const title = document.body.querySelector("span[id='productTitle'], span[id='ebooksProductTitle']"); | |
| if (title === null) { | |
| return; | |
| } | |
| const asin = document.body.querySelector("input[name='ASIN'], input[name='ASIN.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
| # | |
| # 事前準備 | |
| # pip install pure-python-adb pillow | |
| # | |
| # 実行方法 | |
| # $ adb tcpip 5555 | |
| # $ adb connect [ロボホンのIPアドレス]:5555 | |
| # ※USBケーブルを抜く | |
| # $ python robohon-capture.py | |
| # |