diff --git a/.gitignore b/.gitignore
index 2f96e70e2..3d7468500 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,6 +25,10 @@
######################
build/
build-*/
+# mkdocs site output (site_dir: public)
+public/
+# pytest-cov HTML report
+htmlcov/
# Test failure outputs
######################
diff --git a/docs/css/custom.css b/docs/css/custom.css
index adc40dfc7..02fca8d5f 100644
--- a/docs/css/custom.css
+++ b/docs/css/custom.css
@@ -6,6 +6,14 @@
margin: 0 !important;
}
+/* Pre-rendered display equations (see render_docs_math.py). Centered blocks,
+ never wider than the column on small screens. */
+.md-typeset img.math-display {
+ display: block;
+ margin: 0.8em auto !important;
+ max-width: 100%;
+}
+
.md-typeset h5 {
color: black;
text-transform: none;
@@ -41,63 +49,6 @@ img.m5stickv.big {
}
}
-div.group-2 {
- display: flex;
- flex-wrap: wrap;
-}
-
-div.group-2 div.video:first-child {
- margin-right: auto;
-}
-
-div.video {
- max-width: 480px;
- padding-bottom: 2em;
-}
-
-div.video p {
- margin-top: 0;
- margin-bottom: 5px;
-}
-
-div.video img {
- margin: 0 !important;
-}
-
-div.video p {
- font-weight: 700;
-}
-
-div.play-group {
- position: relative;
-}
-
-.play-button {
- position: absolute;
- top: 40%;
- left: 44%;
- color: white;
- width: 60px;
- height: 60px;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 20px;
- pointer-events: none;
- background: rgba(0, 0, 0, 0.7);
- border-radius: 50%;
- padding-left: 5px;
-}
-
-div.play-group:hover .play-button {
- transform: scale(1.1);
- background: rgba(255, 0, 0, 0.8);
-}
-
-div.clear {
- clear: both;
-}
-
.margin-left {
margin-left: 0.8em;
}
\ No newline at end of file
diff --git a/docs/getting-started/features/entropy.en.md b/docs/getting-started/features/entropy.en.md
index cf5d94b68..b18f1cfd3 100644
--- a/docs/getting-started/features/entropy.en.md
+++ b/docs/getting-started/features/entropy.en.md
@@ -19,16 +19,14 @@ Entropy, a fundamental concept in various scientific disciplines, is most common
While thermodynamics entropy deals with physical systems, Shannon's entropy focuses on information content, and cryptographic entropy emphasizes security through randomness.
### Measuring Dice Rolls Entropy
-Entropy is a theoretical measure and is not directly measurable from a single roll but rather from the probability distribution of outcomes over many rolls. We can use Shannon's formula for theoretical and empirical calculations. Entropy $S$ can be quantified with:
+Entropy is a theoretical measure and is not directly measurable from a single roll but rather from the probability distribution of outcomes over many rolls. We can use Shannon's formula for theoretical and empirical calculations. Entropy *S* can be quantified with:
-$$
-S = -\sum_{i=1}^{n} p_i \log(p_i)
-$$
+{ .math-display }
1. **Empirical Measurement:**
- Roll the dice a large number of times to observe the frequency of each outcome.
- - Estimate the probabilities $p_i$ based on observed frequencies.
+ - Estimate the probabilities *pi* based on observed frequencies.
2. **Theoretical Calculation:**
@@ -36,8 +34,8 @@ $$
where:
-- $p_i$ is the probability of each possible outcome (or state) of the system.
-- $n$ is the number of possible outcomes.
+- *pi* is the probability of each possible outcome (or state) of the system.
+- *n* is the number of possible outcomes.
## Empirical (Real) vs. Theoretical Entropy in Dice Rolls
@@ -47,31 +45,23 @@ When calculating the entropy of dice rolls, the difference between real and theo
The theoretical entropy calculation assumes that the dice are perfectly fair, meaning each face has an equal probability of landing face up.
-Consider a fair six-sided die. The possible outcomes when rolling one die are {1, 2, 3, 4, 5, 6}, each with an equal probability of $\frac{1}{6}$.
+Consider a fair six-sided die. The possible outcomes when rolling one die are {1, 2, 3, 4, 5, 6}, each with an equal probability of 1/6.
1. **Single Die Roll:**
- - Each outcome has a probability $p_i = \frac{1}{6}$.
- - The entropy $S$ for one die roll is calculated as:
-$$
-S = - \sum_{i=1}^{6} \left( \frac{1}{6} \log_2 \left( \frac{1}{6} \right) \right)
-$$
-Since $\log_2(1/6) = -\log_2(6)$ :
-$$
-S = -6 \left( \frac{1}{6} \times -\log_2(6) \right) = \log_2(6) \approx 2.585 \text{ bits}
-$$
+ - Each outcome has a probability *pi* = 1/6.
+ - The entropy *S* for one die roll is calculated as:
+{ .math-display }
+Since log₂(1/6) = −log₂(6) :
+{ .math-display }
2. **Multiple Dice Rolls:**
- - For multiple dice, the entropy increases as the number of possible outcomes increases. For $k$ fair dice, the number of possible outcomes is $6^k$.
- - The entropy $S$ for $k$ dice is:
-$$
-S = \log_2(6^k) = k \log_2(6) \approx 2.585k \text{ bits}
-$$
+ - For multiple dice, the entropy increases as the number of possible outcomes increases. For *k* fair dice, the number of possible outcomes is 6k.
+ - The entropy *S* for *k* dice is:
+{ .math-display }
- For example, entropy for the roll of 50 fair dice is calculated as:
-$$
-S = \log_2(6^{50}) = 50 \log_2(6) \approx 2.585 \times 50 \approx 129.25 \text{ bits}
-$$
+{ .math-display }
This calculation assumes that every outcome (each face of the die) has an equal likelihood, leading to a uniform distribution.
@@ -83,11 +73,9 @@ In a real sample of dice rolls, several factors can cause deviations from the pe
2. **Rolling Conditions**: The way the dice are rolled, the surface they land on, and even air currents can introduce slight biases.
3. **Finite Sample Size**: When rolling dice a finite number of times, the observed frequencies of each face will naturally deviate from the expected uniform distribution due to random variations. This phenomenon is more pronounced with smaller sample sizes.
-When you roll a die multiple times and observe the outcomes, you can calculate the empirical probabilities $p_i$ of each face. Using these probabilities, the entropy is calculated as:
+When you roll a die multiple times and observe the outcomes, you can calculate the empirical probabilities *pi* of each face. Using these probabilities, the entropy is calculated as:
-$$
-S = - \sum_{i=1}^{6} p_i \log_2(p_i)
-$$
+{ .math-display }
### Example
@@ -106,67 +94,33 @@ We can calculate Shannon's entropy as follows:
#### Step 1: Calculate Probabilities
- Total number of rolls:
-$$
-N = 4 + 9 + 7 + 10 + 12 + 8 = 50
-$$
+{ .math-display }
- Probabilities for each outcome:
-$$
-p_1 = \frac{4}{50} = 0.08
-$$
-$$
-p_2 = \frac{9}{50} = 0.18
-$$
-$$
-p_3 = \frac{7}{50} = 0.14
-$$
-$$
-p_4 = \frac{10}{50} = 0.2
-$$
-$$
-p_5 = \frac{12}{50} = 0.24
-$$
-$$
-p_6 = \frac{8}{50} = 0.16
-$$
+{ .math-display }
+{ .math-display }
+{ .math-display }
+{ .math-display }
+{ .math-display }
+{ .math-display }
#### Step 2: Compute Entropy
- Using Shannon's entropy formula:
-$$
-S = -\sum_{i=1}^{n} p_i \log_2(p_i)
-$$
+{ .math-display }
- Calculate each term:
-$$
-S_1 = -p_1 \log_2(p_1) = -0.08 \log_2(0.08) = -0.08 \times (-3.64386) = 0.291509
-$$
-$$
-S_2 = -p_2 \log_2(p_2) = -0.18 \log_2(0.18) = -0.18 \times (-2.47393) = 0.445307
-$$
-$$
-S_3 = -p_3 \log_2(p_3) = -0.14 \log_2(0.14) = -0.14 \times (-2.8365) = 0.39711
-$$
-$$
-S_4 = -p_4 \log_2(p_4) = -0.2 \log_2(0.2) = -0.2 \times (-2.32193) = 0.464386
-$$
-$$
-S_5 = -p_5 \log_2(p_5) = -0.24 \log_2(0.24) = -0.24 \times (-2.05889) = 0.494132
-$$
-$$
-S_6 = -p_6 \log_2(p_6) = -0.16 \log_2(0.16) = -0.16 \times (-2.64386) = 0.423018
-$$
+{ .math-display }
+{ .math-display }
+{ .math-display }
+{ .math-display }
+{ .math-display }
+{ .math-display }
- Sum the contributions:
-$$
-S = S_1 + S_2 + S_3 + S_4 + S_5 + S_6
-$$
-$$
-S = 0.291509 + 0.445307 + 0.39711 + 0.464386 + 0.494132 + 0.423018 = 2.515462
-$$
-Thus, the Shannon's entropy for the given distribution of dice rolls is approximately $2.52$ bits per roll. This will give you a different value than $\log_2(6)$ due to the deviations in the empirical probabilities.
-
-- The total entropy for the $N = 50$ rolls is:
-$$
-S_{total} = S \times N = 2.515 + 50 \approx 125.8 \text{ bits}
-$$
+{ .math-display }
+{ .math-display }
+Thus, the Shannon's entropy for the given distribution of dice rolls is approximately 2.52 bits per roll. This will give you a different value than log₂(6) due to the deviations in the empirical probabilities.
+
+- The total entropy for the *N* = 50 rolls is:
+{ .math-display }
#### Shannon's Entropy in Practice
diff --git a/docs/getting-started/features/img/math/eq-01.svg b/docs/getting-started/features/img/math/eq-01.svg
new file mode 100644
index 000000000..03f533233
--- /dev/null
+++ b/docs/getting-started/features/img/math/eq-01.svg
@@ -0,0 +1,292 @@
+
+
+
diff --git a/docs/getting-started/features/img/math/eq-02.svg b/docs/getting-started/features/img/math/eq-02.svg
new file mode 100644
index 000000000..64d09e05f
--- /dev/null
+++ b/docs/getting-started/features/img/math/eq-02.svg
@@ -0,0 +1,306 @@
+
+
+
diff --git a/docs/getting-started/features/img/math/eq-03.svg b/docs/getting-started/features/img/math/eq-03.svg
new file mode 100644
index 000000000..1bf7ab30e
--- /dev/null
+++ b/docs/getting-started/features/img/math/eq-03.svg
@@ -0,0 +1,530 @@
+
+
+
diff --git a/docs/getting-started/features/img/math/eq-04.svg b/docs/getting-started/features/img/math/eq-04.svg
new file mode 100644
index 000000000..d3c09242f
--- /dev/null
+++ b/docs/getting-started/features/img/math/eq-04.svg
@@ -0,0 +1,472 @@
+
+
+
diff --git a/docs/getting-started/features/img/math/eq-05.svg b/docs/getting-started/features/img/math/eq-05.svg
new file mode 100644
index 000000000..e9088bebb
--- /dev/null
+++ b/docs/getting-started/features/img/math/eq-05.svg
@@ -0,0 +1,549 @@
+
+
+
diff --git a/docs/getting-started/features/img/math/eq-06.svg b/docs/getting-started/features/img/math/eq-06.svg
new file mode 100644
index 000000000..c37cac0e5
--- /dev/null
+++ b/docs/getting-started/features/img/math/eq-06.svg
@@ -0,0 +1,324 @@
+
+
+
diff --git a/docs/getting-started/features/img/math/eq-07.svg b/docs/getting-started/features/img/math/eq-07.svg
new file mode 100644
index 000000000..38e6e72bc
--- /dev/null
+++ b/docs/getting-started/features/img/math/eq-07.svg
@@ -0,0 +1,280 @@
+
+
+
diff --git a/docs/getting-started/features/img/math/eq-08.svg b/docs/getting-started/features/img/math/eq-08.svg
new file mode 100644
index 000000000..89d40ac0c
--- /dev/null
+++ b/docs/getting-started/features/img/math/eq-08.svg
@@ -0,0 +1,227 @@
+
+
+
diff --git a/docs/getting-started/features/img/math/eq-09.svg b/docs/getting-started/features/img/math/eq-09.svg
new file mode 100644
index 000000000..d67eac73c
--- /dev/null
+++ b/docs/getting-started/features/img/math/eq-09.svg
@@ -0,0 +1,262 @@
+
+
+
diff --git a/docs/getting-started/features/img/math/eq-10.svg b/docs/getting-started/features/img/math/eq-10.svg
new file mode 100644
index 000000000..a0595736d
--- /dev/null
+++ b/docs/getting-started/features/img/math/eq-10.svg
@@ -0,0 +1,230 @@
+
+
+
diff --git a/docs/getting-started/features/img/math/eq-11.svg b/docs/getting-started/features/img/math/eq-11.svg
new file mode 100644
index 000000000..014b3ab97
--- /dev/null
+++ b/docs/getting-started/features/img/math/eq-11.svg
@@ -0,0 +1,212 @@
+
+
+
diff --git a/docs/getting-started/features/img/math/eq-12.svg b/docs/getting-started/features/img/math/eq-12.svg
new file mode 100644
index 000000000..608bf8d7b
--- /dev/null
+++ b/docs/getting-started/features/img/math/eq-12.svg
@@ -0,0 +1,213 @@
+
+
+
diff --git a/docs/getting-started/features/img/math/eq-13.svg b/docs/getting-started/features/img/math/eq-13.svg
new file mode 100644
index 000000000..68031691d
--- /dev/null
+++ b/docs/getting-started/features/img/math/eq-13.svg
@@ -0,0 +1,238 @@
+
+
+
diff --git a/docs/getting-started/features/img/math/eq-14.svg b/docs/getting-started/features/img/math/eq-14.svg
new file mode 100644
index 000000000..0411d0393
--- /dev/null
+++ b/docs/getting-started/features/img/math/eq-14.svg
@@ -0,0 +1,317 @@
+
+
+
diff --git a/docs/getting-started/features/img/math/eq-15.svg b/docs/getting-started/features/img/math/eq-15.svg
new file mode 100644
index 000000000..2d173b8fb
--- /dev/null
+++ b/docs/getting-started/features/img/math/eq-15.svg
@@ -0,0 +1,522 @@
+
+
+
diff --git a/docs/getting-started/features/img/math/eq-16.svg b/docs/getting-started/features/img/math/eq-16.svg
new file mode 100644
index 000000000..f4e27355b
--- /dev/null
+++ b/docs/getting-started/features/img/math/eq-16.svg
@@ -0,0 +1,502 @@
+
+
+
diff --git a/docs/getting-started/features/img/math/eq-17.svg b/docs/getting-started/features/img/math/eq-17.svg
new file mode 100644
index 000000000..61ededfb0
--- /dev/null
+++ b/docs/getting-started/features/img/math/eq-17.svg
@@ -0,0 +1,530 @@
+
+
+
diff --git a/docs/getting-started/features/img/math/eq-18.svg b/docs/getting-started/features/img/math/eq-18.svg
new file mode 100644
index 000000000..4265a2e0a
--- /dev/null
+++ b/docs/getting-started/features/img/math/eq-18.svg
@@ -0,0 +1,494 @@
+
+
+
diff --git a/docs/getting-started/features/img/math/eq-19.svg b/docs/getting-started/features/img/math/eq-19.svg
new file mode 100644
index 000000000..cd53e0420
--- /dev/null
+++ b/docs/getting-started/features/img/math/eq-19.svg
@@ -0,0 +1,492 @@
+
+
+
diff --git a/docs/getting-started/features/img/math/eq-20.svg b/docs/getting-started/features/img/math/eq-20.svg
new file mode 100644
index 000000000..669a3c26a
--- /dev/null
+++ b/docs/getting-started/features/img/math/eq-20.svg
@@ -0,0 +1,467 @@
+
+
+
diff --git a/docs/getting-started/features/img/math/eq-21.svg b/docs/getting-started/features/img/math/eq-21.svg
new file mode 100644
index 000000000..d1ebd27b9
--- /dev/null
+++ b/docs/getting-started/features/img/math/eq-21.svg
@@ -0,0 +1,261 @@
+
+
+
diff --git a/docs/getting-started/features/img/math/eq-22.svg b/docs/getting-started/features/img/math/eq-22.svg
new file mode 100644
index 000000000..c253c68b3
--- /dev/null
+++ b/docs/getting-started/features/img/math/eq-22.svg
@@ -0,0 +1,412 @@
+
+
+
diff --git a/docs/getting-started/features/img/math/eq-23.svg b/docs/getting-started/features/img/math/eq-23.svg
new file mode 100644
index 000000000..b2ea8d842
--- /dev/null
+++ b/docs/getting-started/features/img/math/eq-23.svg
@@ -0,0 +1,513 @@
+
+
+
diff --git a/docs/getting-started/navigation.en.md b/docs/getting-started/navigation.en.md
deleted file mode 100644
index 9390dc5d6..000000000
--- a/docs/getting-started/navigation.en.md
+++ /dev/null
@@ -1,7 +0,0 @@
-Below is the mind map representation of the currently menus available. Click the circle with a number (Ex.: :material-numeric-3-circle-outline:) to the right of each node to expand and explore. Also, enable full screen in the top right menu for better viewing :wink:.
-
-### Login Menu
-
-
-### Home Menu (Loaded a mnemonic)
-
diff --git a/docs/parts.en.md b/docs/parts.en.md
index 91026f28a..f94e0ba34 100644
--- a/docs/parts.en.md
+++ b/docs/parts.en.md
@@ -6,11 +6,11 @@
| ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- |
| Price range | US$ 50-55 | US$ 50-85 | US$ 27-35 | US$ 45-61 | US$ 34-49 | US$ 58-86 | US$ 48 | US$ 74 |
| Screen size /
Res. px /
PPI | 1.14" /
135 x 240 /
241 | 3.5" /
320 x 480 /
165 | 2.4" /
240 x 320 /
167 | 2" /
240 x 320 /
200 | 1.3" /
240 x 240 /
261 | 2" /
240 x 320 /
200| 2" /
240 x 320 /
200 | 2.4" /
240 x 320 /
167 |
-| Brightness control | :white_check_mark: | :x: | :x: | :x: | :white_check_mark: | :white_check_mark: | :x: | :x: |
+| Brightness control | :material-check: | :material-close: | :material-close: | :material-close: | :material-check: | :material-check: | :material-close: | :material-close: |
| Device size | 48 x 24 x 22mm | 104 x 63 x 17mm | 98 x 59 x 18mm | 57 x 41 x 17mm | 40 x 40 x 16mm | 59 x 41 x 17mm | 57 x 41 x 16mm | 63 x 45 x 14mm |
-| Touchscreen | :x: | Capacitive | :x: | Capacitive | :x: | Capacitive | Capacitive | Capacitive |
+| Touchscreen | :material-close: | Capacitive | :material-close: | Capacitive | :material-close: | Capacitive | Capacitive | Capacitive |
| Camera | `OV7740` | `OV7740` rear /
`GC0328` front | `GC0328` | `OV2640` (VER:1.0) or
`GC2145` (VER:1.1) | `OV7740` | `GC2145` | `GC2145` or
`GC0328` | `OV2640` or
`GC2145` |
-| Battery | 200mAh | 520mAh | :x: | :x: | 200mAh | :x: | :x: | :x: |
+| Battery | 200mAh | 520mAh | :material-close: | :material-close: | 200mAh | :material-close: | :material-close: | :material-close: |
| Requirements | None | None | [Rotary encoder](https://duckduckgo.com/?q=ky-040)
[3D printed case](https://github.com/selfcustody/DockEncoderCase)
Soldering
Assembly | None | None | None | None | None |
| Warnings | [:material-numeric-1-circle:{ title="USB-C recognition" }](#pull-up-resistor-info) | [:material-numeric-2-circle:{ title="Maix Amigo screens" }](#amigo-info) | [:material-numeric-3-circle:{ title="Maix Dock and soldered pin" }](#dock-info) | Micro USB | 3-Way button | [:material-numeric-1-circle:{ title="USB-C recognition" }](#pull-up-resistor-info) [:material-numeric-4-circle:{ title="WonderMV and SD card" }](#wondermv-info) | None | [:material-numeric-5-circle:{ title="Embed Fire loose touchscreen" }](#embedfire-info) |
diff --git a/docs/support.en.md b/docs/support.en.md
index 038a58edd..1b0bb96d7 100644
--- a/docs/support.en.md
+++ b/docs/support.en.md
@@ -5,7 +5,7 @@ hide:
## Ways you can help
### Development
-Audit the code, file an issue, make a pull request, or do all three :smiley:.
+Audit the code, file an issue, make a pull request, or do all three :material-emoticon-happy:.
### Documentation
*"I'd like to see Krux help as many people as possible, and to do that, good documentation is needed. If you identify a better way to say something, please make a PR, any help is appreciated."* - Jeff
diff --git a/docs/video-tutorials.en.md b/docs/video-tutorials.en.md
index e2ac23147..527ddf2fc 100644
--- a/docs/video-tutorials.en.md
+++ b/docs/video-tutorials.en.md
@@ -2,229 +2,30 @@ Most people prefer to learn by watching videos, and we are fortunate to have exc
## English
-