Skip to content

Commit 18d3036

Browse files
committed
upadted docs including images
1 parent e1074da commit 18d3036

12 files changed

+98
-1
lines changed

.DS_Store

6 KB
Binary file not shown.

.vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"restructuredtext.confPath": "${workspaceFolder}/docs"
3+
}

docs/.DS_Store

6 KB
Binary file not shown.

docs/buildhat/.DS_Store

6 KB
Binary file not shown.

docs/buildhat/colorsensor.rst

+9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
ColorSensor
22
===========
33

4+
|location_link|
5+
6+
.. |location_link| raw:: html
7+
8+
<a href="https://education.lego.com/en-gb/products/lego-technic-color-sensor/45605" target="_blank">LEGO Colour Sensor 45605</a>
9+
10+
11+
The LEGO® Education SPIKE™ Colour sensor can sort between 8 different colours and can measure reflected and ambient or natural light.
12+
413
.. autoclass:: buildhat.ColorSensor
514
:members:
615
:inherited-members:

docs/buildhat/distancesensor.rst

+9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
DistanceSensor
22
==============
33

4+
|location_link|
5+
6+
.. |location_link| raw:: html
7+
8+
<a href="https://education.lego.com/en-gb/products/lego-technic-distance-sensor/45604" target="_blank">LEGO Distance Sensor 45604</a>
9+
10+
11+
The LEGO® Education SPIKE™ Colour sensor behaves like a conventional ultrasonic range finder but also has 4 LEDs that can be used to create the "eyes" of a robot. Each LED can be controlled individually.
12+
413
.. autoclass:: buildhat.DistanceSensor
514
:members:
615
:inherited-members:

docs/buildhat/forcesensor.rst

+10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
ForceSensor
22
===========
33

4+
|location_link|
5+
6+
.. |location_link| raw:: html
7+
8+
<a href="https://education.lego.com/en-gb/products/lego-technic-force-sensor-by-lego-education/45606" target="_blank">LEGO® Force Sensor Set 45606e</a>
9+
10+
11+
The LEGO® Education SPIKE™ Prime Force Sensor (also known as the LEGO® Technic Force Sensor) can measure pressure of up to 10 Newtons, but it can also be used as a touch sensor or a simple button.
12+
13+
414
.. autoclass:: buildhat.ForceSensor
515
:members:
616
:inherited-members:
533 KB
Loading

docs/buildhat/images/lpf2.jpg

23.4 KB
Loading

docs/buildhat/index.rst

+18-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,27 @@
33
Library
44
=======
55

6+
The Build HAT library has been created to support the Raspberry Pi Build HAT,
7+
an add-on board for the Raspberry Pi computer which allows control of up to 4 LEGO® Technic™ motors and sensors included in the SPIKE™ Portfolio.
8+
9+
.. image:: images/BuildHAT_closeup.jpg
10+
:width: 300
11+
:alt: The Raspberry Pi Build HAT
12+
13+
14+
Other LEGO® devices may be supported if they use the LPF2 connector:
15+
16+
.. image:: images/lpf2.jpg
17+
:width: 100
18+
:alt: The LEGO LPF2 connector
19+
20+
In order to drive motors, your Raspberry Pi and Build HAT will need an external 7.5v
21+
power supply. For best results, use the official Raspberry Pi Build HAT power supply.
22+
623
.. warning::
724

825
The API for the Build HAT is undergoing active development and is subject
9-
to change.
26+
to change.
1027

1128
.. toctree::
1229
:maxdepth: 2

docs/buildhat/matrix.rst

+31
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,37 @@
11
Matrix
22
======
33

4+
The Spike 3x3 LED matrix has individual elements that can be set individually or as a whole.
5+
6+
Colours may be passed as string or integer parameters.
7+
8+
.. list-table:: LED Matrix colours
9+
:widths: 10 20
10+
:header-rows: 1
11+
12+
* - Number
13+
- Name
14+
* - 0
15+
-
16+
* - 1
17+
- pink
18+
* - 2
19+
- lilac
20+
* - 3
21+
- blue
22+
* - 4
23+
- cyan
24+
* - 5
25+
- turquoise
26+
* - 6
27+
- green
28+
* - 7
29+
- yellow
30+
* - 8
31+
- orange
32+
* - 9
33+
- red
34+
435
.. autoclass:: buildhat.Matrix
536
:members:
637
:inherited-members:

docs/buildhat/motor.rst

+18
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
11
Motor
22
=====
33

4+
Motors from he LEGO® Education SPIKE™ portfolio have an integrated rotation sensor (encoder) and can be positioned 1-degree accuracy. The encoders which can be queried to find the current
5+
position of the motor with respect to a 'zero' mark shown on the motor itself. Other motors
6+
without encodes will report a 0 value if queried.
7+
8+
|location_link1|
9+
10+
.. |location_link1| raw:: html
11+
12+
<a href="https://education.lego.com/en-gb/products/lego-technic-large-angular-motor/45602" target="_blank">LEGO® Large angular motor 45602</a>
13+
14+
|location_link2|
15+
16+
.. |location_link2| raw:: html
17+
18+
<a href="https://education.lego.com/en-gb/products/lego-technic-medium-angular-motor/45603" target="_blank">LEGO® Medium angular motor 45603</a>
19+
20+
21+
422
.. autoclass:: buildhat.Motor
523
:members:
624
:inherited-members:

0 commit comments

Comments
 (0)