Skip to content

Commit f9e6cbe

Browse files
committed
Replace Hugo shortcodes with mkdocs admonitions
1 parent 82c3b1f commit f9e6cbe

File tree

9 files changed

+38
-67
lines changed

9 files changed

+38
-67
lines changed

docs/api/arduino.md

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,8 @@ imported before they can be used.
8080
from sbot import GPIOPinMode
8181
```
8282

83-
{{% notice tip %}}
84-
The input modes closely resemble those of an Arduino. More information
85-
on them can be found in [their
86-
docs](https://www.arduino.cc/en/Tutorial/DigitalPins).
87-
{{% /notice %}}
83+
!!! tip
84+
The input modes closely resemble those of an Arduino. More information on them can be found in [their docs](https://www.arduino.cc/en/Tutorial/DigitalPins).
8885

8986
### Setting the pin mode
9087

@@ -138,11 +135,10 @@ have to be read differently. The Arduino has six analogue inputs, which
138135
are labelled `A0` to `A5`; however pins `A4` and `A5` are reserved and
139136
cannot be used.
140137

141-
{{% notice tip %}}
142-
Analogue signals can have any voltage, while digital signals can only
143-
take on one of two voltages. You can read more about digital vs analogue
144-
signals [here](https://learn.sparkfun.com/tutorials/analog-vs-digital).
145-
{{% /notice %}}
138+
!!! tip
139+
Analogue signals can have any voltage, while digital signals can only
140+
take on one of two voltages. You can read more about digital vs analogue
141+
signals [here](https://learn.sparkfun.com/tutorials/analog-vs-digital).
146142

147143
``` python
148144
from sbot import AnaloguePin
@@ -152,10 +148,8 @@ r.arduino.pins[AnaloguePin.A0].mode = GPIOPinMode.ANALOGUE_INPUT
152148
pin_value = r.arduino.pins[AnaloguePin.A0].analogue_value
153149
```
154150

155-
{{% notice tip %}}
156-
The values are the voltages read on the pins, between 0 and 5.
157-
{{% /notice %}}
151+
!!! tip
152+
The values are the voltages read on the pins, between 0 and 5.
158153

159-
{{% notice warning %}}
160-
Pins `A4` and `A5` are reserved and cannot be used.
161-
{{% /notice %}}
154+
!!! warning
155+
Pins `A4` and `A5` are reserved and cannot be used.

docs/api/index.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,8 @@ defined as `r`.
2828
Your code needs to be put in the `zone-0` or `zone-1` folder in a file called
2929
`forklift.py` or `crane.py` for the forklift and crane robots respectively.
3030

31-
{{% notice tip %}}
32-
If this file is missing or incorrectly named, your robot won't do
33-
anything. No log file will be created.
34-
{{% /notice %}}
31+
!!! tip
32+
If this file is missing or incorrectly named, your robot won't do anything. No log file will be created.
3533

3634
## Logs
3735

@@ -51,7 +49,5 @@ install some extra ones which may be of use:
5149
- [scikit-learn 0.23.2](https://pypi.org/project/scikit-learn/0.23.2/)
5250
- [scipy 1.5.4](https://pypi.org/project/scipy/1.5.4/)
5351

54-
{{% notice tip %}}
55-
If you would like an extra library installed, go and ask a volunteer to
56-
see if we can help.
57-
{{% /notice %}}
52+
!!! tip
53+
If you would like an extra library installed, go and ask a volunteer to see if we can help.

docs/api/motor-board.md

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,8 @@ accessed using the `motor_board` property of the `Robot` object.
1414
my_motor_board = r.motor_board
1515
```
1616

17-
{{% notice warning %}}
18-
If there is more than one motor board on your kit, you *must* use the
19-
`motor_boards` property. `r.motor_board` *will cause an error*. This is
20-
because the kit doesn't know which motor board you want to access.
21-
{{% /notice %}}
17+
!!! warning
18+
If there is more than one motor board on your kit, you *must* use the `motor_boards` property. `r.motor_board` *will cause an error*. This is because the kit doesn't know which motor board you want to access.
2219

2320
Motor boards attached to your robot can be accessed under the
2421
`motor_boards` property of the `Robot`. The boards are indexed by their
@@ -63,17 +60,11 @@ my_motor_board.motors[1].power
6360
>>> -1
6461
```
6562

66-
{{% notice warning %}}
67-
Setting a value outside of the range `-1` to `1` will raise an exception
68-
and your code will crash.
69-
{{% /notice %}}
63+
!!! warning
64+
Setting a value outside of the range `-1` to `1` will raise an exception and your code will crash.
7065

71-
{{% notice warning %}}
72-
Sudden large changes in the motor speed setting (e.g. `-1` to `0`, `1`
73-
to `-1` etc.) will likely trigger the over-current protection and your
74-
robot will shut down with a distinct beeping noise and/or a red light
75-
next to the power board output that is powering the motor board.
76-
{{% /notice %}}
66+
!!! danger
67+
Sudden large changes in the motor speed setting (e.g. `-1` to `0`, `1` to `-1` etc.) will likely trigger the over-current protection and your robot will shut down with a distinct beeping noise and/or a red light next to the power board output that is powering the motor board.
7768

7869
### Special values
7970

@@ -90,9 +81,8 @@ from sbot import BRAKE, COAST
9081
`BRAKE` will stop the motors from turning, and thus stop your robot as
9182
quick as possible.
9283

93-
{{% notice tip %}}
94-
`BRAKE` does the same as setting the power to `0`.
95-
{{% /notice %}}
84+
!!! note
85+
`BRAKE` does the same as setting the power to `0`.
9686

9787
``` python
9888
from sbot import BRAKE

docs/api/servos.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ The servo assembly can interface with up to sixteen servos connected to it.
1212
servo_zero = r.arduino.servos[0]
1313
```
1414

15-
{{% notice tip %}}
16-
Servo can be connected to any port, you don't have to start at 0!
17-
{{% /notice %}}
15+
!!! info
16+
Servo can be connected to any port, you don't have to start at 0!
1817

1918
## Controlling servos
2019

@@ -26,6 +25,5 @@ print(servo_zero.position)
2625
>>> 0.65
2726
```
2827

29-
{{% notice tip %}}
30-
When `position` is set to `None`, the servo loses power and can freely rotate. This is the same state they're in at start-up.
31-
{{% /notice %}}
28+
!!! tip
29+
When `position` is set to `None`, the servo loses power and can freely rotate. This is the same state they're in at start-up.

docs/api/ultrasound.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,5 @@ time_taken = u.pulse()
3737
distance_metres = u.distance()
3838
```
3939

40-
{{% notice warning %}}
41-
If the ultrasound signal never returns, the sensor will timeout and
42-
return `None`.
43-
{{% /notice %}}
40+
!!! warning
41+
If the ultrasound signal never returns, the sensor will timeout and return `None`.

docs/kit/pi.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,5 @@ The Raspberry Pi is enclosed in a plastic case to protect the delicate component
1111
## Included software
1212
The software included on the Raspberry Pi allows it to run your robot. No graphical or user-required software is installed. You _do not_ need to connect to your Raspberry Pi from a computer in order to use your robot.
1313

14-
{{% notice warning %}}
15-
Please do not attempt to modify the software on the Raspberry Pi. It has been configured and tested in its current configuration. Unauthorized modifications may damage your robot or prevent accurate debugging.
16-
{{% /notice %}}
14+
!!! warning
15+
Please do not attempt to modify the software on the Raspberry Pi. It has been configured and tested in its current configuration. Unauthorized modifications may damage your robot or prevent accurate debugging.

docs/kit/power-board.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ There is also a Micro USB B connector which should be used to connect the Raspbe
2828

2929
Finally, there are connectors for external Start and On|Off switches. You may connect any latching switch for the On|Off switch, or a push-to-make button for the Start button.
3030

31-
{{% notice note %}}
32-
If you intend to use only the internal On|Off switch, a CamCon must be plugged into the On|Off connector with a wire connecting one pin to the other pin on the same connector. Your power board should already have one of these plugged in.
33-
{{% /notice %}}
31+
!!! note
32+
If you intend to use only the internal On|Off switch, a CamCon must be plugged into the On|Off connector with a wire connecting one pin to the other pin on the same connector. Your power board should already have one of these plugged in.
3433

3534
## Indicators
3635
| LED | Meaning | Initial power-up state |

docs/kit/servo-assembly/GPIO.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ The Arduino allows you to connect your kit to your own electronics. It has fourt
66

77
The pin layout of the servo assembly is the same as an Arduino Uno.
88

9-
{{% notice note %}}
10-
The Arduino communicates with the servo shield using two of the analogue input pins (4 and 5), and with the Raspberry Pi using two of the digital IO pins (0 and 1). These four pins are therefore reserved, and using them may cause the Arduino or servo shield to behave unusually.
11-
{{% /notice %}}
9+
!!! note
10+
The Arduino communicates with the servo shield using two of the analogue input pins (4 and 5), and with the Raspberry Pi using two of the digital IO pins (0 and 1). These four pins are therefore reserved, and using them may cause the Arduino or servo shield to behave unusually.
1211

1312
![Pin Map](https://raw.githubusercontent.com/Bouni/Arduino-Pinout/master/Arduino%20Uno%20R3%20Pinout.png?width=50pc)

docs/kit/servo-assembly/ultrasound.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@ title: Ultrasound
44

55
Ultrasound sensors are a useful way of measuring distance. Ultrasound sensors communicate with the kit using two wires. A signal is sent to the sensor on the _trigger_ pin, and the length of a response pulse on the _echo_ pin can be used to calculate the distance.
66

7-
{{% notice warning %}}
8-
Ultrasound should only be considered accurate up to around two metres, beyond which the signal can become distorted and produce erroneous results.
9-
{{% /notice %}}
7+
!!! warning
8+
Ultrasound should only be considered accurate up to around two metres, beyond which the signal can become distorted and produce erroneous results.
109

1110
## Wiring up the sensor
1211
The sensor has four pin connections: ground, 5V (sometimes labelled _vcc_), _trigger_ and _echo_. Most ultrasound sensors will label which pin is which. The ground and 5V should be wired to the ground and 5V pins of the Arduino respectively. The trigger and echo pins should be attached to two different digital IO pins. Take note of these two pins, you'll need them to [use the sensor](../../../api/arduino#ultrasound-sensors).
1312

14-
{{% notice tip %}}
15-
If the sensor always returns a distance of zero, it means the _trigger_ and _echo_ pins are connected the wrong way! Either change the pin numbers in the code, or swap the connections.
16-
{{% /notice %}}
13+
!!! tip
14+
If the sensor always returns a distance of zero, it means the _trigger_ and _echo_ pins are connected the wrong way! Either change the pin numbers in the code, or swap the connections.

0 commit comments

Comments
 (0)