Skip to content

Commit eb140b8

Browse files
committed
update docs
1 parent 436ad7a commit eb140b8

File tree

11 files changed

+149
-6
lines changed

11 files changed

+149
-6
lines changed

docs/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ For quick questions there's no need to open an issue, because you can reach us o
99

1010
## Found a bug?
1111

12-
If you find a bug in the source code, you can help us by submitting an issue to the [issue tracker](https://github.com/makerdiary/mx-keyboard/issues) in our GitHub repository. Even better, you can submit a Pull Request with a fix.
12+
If you find a bug in the source code, you can help us by submitting an issue to the [issue tracker](https://github.com/makerdiary/python-keyboard/issues) in our GitHub repository. Even better, you can submit a Pull Request with a fix.
1313

1414
## Requesting a tutorial
1515

docs/assembling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
2. Attach the provided 2.4GHz and NFC cabled PCB antennas to the nRF52840 M.2 module as shown in the figure below:
66

7-
![Attaching Antennas](https://wiki.makerdiary.com/nrf52840-m2-devkit/assets/images/attaching-antennas-to-m2.webp)
7+
![Attaching Antennas](./assets/images/attaching-antennas-to-m2.jpg)
88

99
3. Insert the module into the connector as shown in the figure below:
1010

79.1 KB
Loading

docs/backlight.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Backlight
2+
3+
The keboard has 64 programmable RGB LEDs. We are still working on the backlight. Before we get it done,
4+
you are able to customize the backlight in the `macro_handler`.
5+
For example, we set <kbd>9</kbd> to red color when a macro key pressed, and turn into green color
6+
when the macro key is released:
7+
8+
```python
9+
def macro_handler(dev, n, is_down):
10+
if is_down:
11+
dev.backlight.pixel(9, 0xff, 0, 0)
12+
else:
13+
dev.backlight.pixel(9, 0, 0xff, 0)
14+
dev.backlight.update()
15+
```
16+
17+
`dev.backlight` provides some basic fucntions to control the RGB LEDs
18+
19+
## Backlight APIs
20+
+ `update()` synchronizes with its buffer.
21+
+ `pixel(i, r, g, b)` sets the bufffer of the LED `i`
22+
+ `set_brightness(value)` sets the global brightness of all LEDs (from 0 to 255)
23+
24+
## Index of RGB LED
25+
You can find the index of an LED here.
26+
```
27+
# ESC(0) 1(1) 2(2) 3(3) 4(4) 5(5) 6(6) 7(7) 8(8) 9(9) 0(10) -(11) =(12) BACKSPACE(13)
28+
# TAB(27) Q(26) W(25) E(24) R(23) T(22) Y(21) U(20) I(19) O(18) P(17) [(16) ](15) \(14)
29+
# CAPS(28) A(29) S(30) D(31) F(32) G(33) H(34) J(35) K(36) L(37) ;(38) "(39) ENTER(40)
30+
#LSHIFT(52) Z(51) X(50) C(49) V(48) B(47) N(46) M(45) ,(44) .(43) /(42) RSHIFT(41)
31+
# LCTRL(53) LGUI(54) LALT(55) SPACE(56) RALT(57) MENU(58) Fn(59) RCTRL(60)
32+
```
33+
34+
No.61 and No.62 are under the space key. No.63 is at the back of keyboard.
35+

docs/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ If you already Python, configuring the keyboard is simple. If not, here are some
116116
),
117117
```
118118

119-
2. IUse <kbd>Caps</kbd> as a Tap-key to activate navigation functions, instead of <kbd>D</kbd>. To implement this, you only need to change `layer 0` to:
119+
2. Use <kbd>Caps</kbd> as a Tap-key to activate navigation functions, instead of <kbd>D</kbd>. To implement this, you only need to change `layer 0` to:
120120

121121
```python
122122
# layer 0

docs/developer_guide/hardware.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Hardware
2+
3+
## Specs
4+
| | M60 Keyboard |
5+
|-----------------|---------------------------------------------------------------------------------------------------------|
6+
| Core Module | nRF52840, Arm Cortex-M4F, 64MHz, 256KB RAM, 1MB FLASH, 8MB QSPI Flash, M.2 KEY-E |
7+
| Wireless | Bluetooth Low Energy 5.0, NFC |
8+
| USB | Type-C |
9+
| Layout | 60% (61 Keys) |
10+
| Hot-Swappable | Yes |
11+
| Switch Option | Cherry MX compatible Switches |
12+
| Backlight | 64 RGB LEDs, IS32FL3733 |
13+
|Battery Connector| JST 1.25mm 3-Pin |
14+
| RF Antennas | 2.4GHz Cabled PCB Antenna, NFC Cabled PCB Antenna |
15+
| Dimensions | 285 mm x 94.6 mm |
16+
17+
![](https://github.com/makerdiary/python-keyboard/blob/master/img/hotswappable.jpg?raw=true)
18+
19+
## Keyboard Matrix
20+
The pins of 8x8 keyboard matrix:
21+
22+
| | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
23+
|-----|-------|-------|-------|-------|-------|-------|-------|-------|
24+
| ROW | P0_05 | P0_06 | P0_07 | P0_08 | P1_09 | P1_08 | P0_12 | P0_11 |
25+
| COL | P0_19 | P0_20 | P0_21 | P0_22 | P0_23 | P0_24 | P0_25 | P0_26 |
26+
27+
## Power
28+
+ When powered by USB, the keyboard is always on.
29+
+ When powered by a battery, the keyboard is on if the ON/OFF button is pressed or pin `P0_28` outputs `0`.
30+
31+
## Button
32+
The ON/OFF Button is at the back of the keyboard. It is connected to `P0_27`.
33+
34+
## LEDs on M.2
35+
| LEDs | Pin |
36+
|--------------- | ------|
37+
| Red LED | P0_30 |
38+
| Green LED | P0_29 |
39+
| Blue LED | P0_31 |
40+
41+
## RGB LEDs Matrix
42+
The RGB LEDs Matrix has 64 RGB LEDs and is driven by IS32FL3733.
43+
44+
| name | Pin | note |
45+
|--------------- | -------| --------------|
46+
| Power | P1_04 | 1: on, 0: off |
47+
| I2C SDA | P1_05 | |
48+
| I2C SCL | P1_06 | |
49+
| Interrupt | P1_07 | |
50+
51+
52+
## Battery
53+
| name | Pin | note |
54+
|--------------- | -------| --------------|
55+
| Charging | P0_03 | 0: charging |
56+
| Voltage | P0_02 | AIN0 |
57+

docs/developer_guide/index.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Dive Into Keyboard
2+
3+
Normally, you only need to change `code.py` to configure the keyboard.
4+
If you are very good at Python and have a new idea which can not be implemented in `code.py`,
5+
you can modify [the `keyboard` library](https://github.com/makerdiary/python-keyboard/tree/main/keyboard).
6+
7+
8+
!!! Note
9+
When you modify the `keyboard` library, the keyboard may stop working if there is any syntax error or other error in the code. You will need another keyboard to fix it. If you get a fatal error, you can always do a [factory reset](../factory_reset.md).
10+
11+
By default, The CircuitPython firmware of M60 has two frozen modules - [`adafruit_ble`](https://github.com/adafruit/Adafruit_CircuitPython_BLE) and `PYKB`. `PYKB` is a frozen version of the `keyboard` library.
12+
13+
## Use latest `keyboard` library
14+
1. Copy `keyboard` folder of [python-keyboard](https://github.com/makerdiary/python-keyboard/tree/main/keyboard) to the `lib` directory of the `CIRCUITPY` USB drive.
15+
2. Replace `from PYKB import *` to `from keyboard import *` in `code.py` of the USB drive.
16+
17+
18+
## Develop with C/C++, Rust, JerryScript, TinyGo
19+
The M60 keybaord also supports C/C++, Rust, JerryScript and TinyGo. To create your own firmware, read [the hardware information](hardware.md) to get started.

docs/factory_reset.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Factory Reset
2+
3+
If you get a fatal error when you modify the code of keyboard, you can always do a factory reset:
4+
5+
1. Download [factory_reset.uf2](https://gitee.com/makerdiary/python-keyboard/attach_files/469654/download), follow [the firmware upgrade guide](upgrade_firmware.md) to flash `factoary_reset.uf2`. It will erase the storage of the keyboard.
6+
7+
2. Flash the latest firmware from [python-keyboard / firmware](https://github.com/makerdiary/python-keyboard/tree/main/firmware).

docs/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ It can run Python code saved in its USB storage, which makes it super powerful.
3838
| RF Antennas | 2.4GHz Cabled PCB Antenna, NFC Cabled PCB Antenna |
3939
| Dimensions | 285 mm x 94.6 mm (compatible with DZ60 cases) |
4040

41-
**Note: The M60 PCB uses a north-facing switch orientation. If you plan to use Cherry MX or low-profile keycaps, be sure to purchase key switches that are beveled on both the north and south ends. See Issue #3.**
41+
!!! Note
42+
The M60 PCB uses a north-facing switch orientation. If you plan to use Cherry MX or low-profile keycaps, be sure to purchase key switches that are beveled on both the north and south ends. See Issue #3.
4243

4344
[1]: https://gitee.com/makerdiary/python-keyboard/wikis/pages

docs/where_to_buy.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Where to Buy M60 Keyboard
2+
3+
## Buy Online
4+
5+
M60 keyboard is available on the following channels (click to go directly to the product):
6+
7+
[![makerdiary store](https://wiki.makerdiary.com/nrf52840-m2-devkit/assets/images/makerdiary-store-logo.png)](https://makerdiary.com/collections/frontpage/products/m60-mechanical-keyboard-pcba)
8+
9+
10+
[![Taobao](https://github.com/makerdiary/nrf52840-m2-devkit/raw/master/docs/assets/images/taobao-logo.png)](https://item.taobao.com/item.htm?id=623296623963)
11+
12+
## Bulk & Customization
13+
14+
We are ready to customize our electronics and firmware to better meet your solution's needs. Many of our platforms are prepared for customization.
15+
16+
If you would like to do some serious business, [drop a line](mailto:zelin@makerdiary.com) and we'll reply before you know it.
17+
18+
<a href="mailto:zelin@makerdiary.com"><button data-md-color-primary="marsala"><i class="fa fa-envelope"></i> Email Us</button></a>

mkdocs.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
site_name: M60 Keyboard
2323
site_description: The documentation offers all you need to start using M60 Keyboard.
2424
site_author: makerdiary
25-
site_url: https://wiki.makerdiary.com/python-keyboard
25+
site_url: https://wiki.makerdiary.com
2626

2727
# Repository
2828
repo_name: makerdiary/python-keyboard
@@ -116,7 +116,7 @@ markdown_extensions:
116116
- pymdownx.magiclink:
117117
repo_url_shorthand: true
118118
user: makerdiary
119-
repo: mx-keyboard
119+
repo: python-keyboard
120120
- pymdownx.mark
121121
- pymdownx.smartsymbols
122122
- pymdownx.snippets:
@@ -136,7 +136,13 @@ nav:
136136
- Keycodes: keycodes.md
137137
- Macro: macro.md
138138
- Pair-Keys: pair-keys.md
139+
- Backlight: backlight.md
139140
- Upgrade: upgrade_firmware.md
141+
- Factory Reset: factory_reset.md
142+
- Developer Guide:
143+
- Dive Into Keyboard: developer_guide/index.md
144+
- Hardware: developer_guide/hardware.md
145+
- Where to Buy: where_to_buy.md
140146
- Contributing: CONTRIBUTING.md
141147
- 中文: https://gitee.com/makerdiary/python-keyboard/wikis/pages
142148

0 commit comments

Comments
 (0)