カスタムファームウェアをキーボードへ書き込んだら、テストする準備が整います。運が良ければ全て問題なく動作しているはずですが、もしそうでなければこのドキュメントがどこが悪いのか調べるのに役立ちます。
通常、キーボードをテストするのは非常に簡単です。全てのキーをひとつずつ押して、期待されるキーが送信されていることを確認します。キーを押したことを見逃さないためのプログラムもあります。
メモ: これらのプログラムはQMKによって提供・承認されたものではありません。
| # The center of circle is grid origin | |
| import pcbnew | |
| import math | |
| def circular(refList, angleStart, angleEnd, radiusMM): | |
| board = pcbnew.GetBoard() | |
| modules = board.GetModules() | |
| center = board.GetGridOrigin() | |
| angleStep = float((angleEnd - angleStart)) / (len(refList)-1) |
| /* | |
| JoystickMouseControl | |
| Controls the mouse from a joystick on an Arduino Leonardo, Micro or Due. | |
| Uses a pushbutton to turn on and off mouse control, and a second pushbutton | |
| to click the left mouse button. | |
| Hardware: | |
| - 2-axis joystick connected to pins A0 and A1 | |
| - pushbuttons connected to pin D2 and D3 |
windows上でstm32搭載のキーボードのファームウェアを書き換える際、usb-dfuブートローダのドライバを入れ替える必要があります。
STM Device in DFU Modeとして認識されているはず)Options → List All devicesにチェックSTM Device in DFU Modeを選択して、WinUSBをインストールするSTM32 Bootloaderとして認識されていればOK)| import sys | |
| def generate_footprint(size, isPCB, hasLED, isReversible): | |
| unit = f"{size:.2f}" | |
| mount = "PCB" if isPCB else "Plate" | |
| # header | |
| body = f'(module SW_Cherry_MX1A_{unit}u_{mount}{"_LED" if hasLED else ""}{"_Reversible" if isReversible else ""} (layer F.Cu) (tedit 5BB19F47)\n' | |
| body += f' (descr "Cherry MX keyswitch, MX1A, {unit}u, {mount} mount, http://cherryamericas.com/wp-body/uploads/2014/12/mx_cat.pdf")\n' | |
| body += f' (tags "cherry mx keyswitch MX1A {unit}u {mount}{" Reversible" if isReversible else ""}")\n' |
はじめに
1.1 本書の目標
1.2 使用するソフトウェアとその準備
キーボードを作るワークフロー
2.1 全体の流れ
2.2 ラフデザインから始めよう
2.3 部品の選定と回路図
2.4 ケースの設計
| # -*- coding utf-8 -*- | |
| import sys,time | |
| import numpy | |
| from PIL import Image, ImageSequence | |
| def clearDisplay(): | |
| print("\033[2J",end='') | |
| def printPixel(color): | |
| colorIn256 = 16 + round(color[0]/255*5) * 36 + round(color[1]/255*5) * 6 + round(color[2]/255*5) |
| void hSync(byte a[][8]){ | |
| for(int i = 0;i < 8;i++){//階層ループ | |
| for(int j = 0;j < 8;j++){//列ループ | |
| for(int k = 0;k < 8;k++){ | |
| // このLEDCUBEではシフトレジスタのclk(SCK)とratch(RCK)を共有しています。 | |
| // そのため、8つのシフトレジスタのser(SI)にそれぞれデータをセットして | |
| digitalWrite(ser[k],bitRead(a[i][k],j)); | |
| } | |
| digitalWrite(clk,1); |