Skip to content

Commit

Permalink
Correct spelling mistakes discovered in docs and examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
ntoll committed Feb 2, 2016
1 parent 2b26491 commit a9deb1a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/compass.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Functions
returns ``False`` otherwise.


.. py:function:: clear_calibrarion()
.. py:function:: clear_calibration()
Undoes the calibration, making the compass uncalibrated again.

Expand Down
2 changes: 1 addition & 1 deletion docs/pin.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ to that.

.. note::
Those classes are not actually available for the user, you can't create
new instances of them. You can only use the instaces already provided,
new instances of them. You can only use the instances already provided,
representing the physical pins on your board.

.. py:class:: MicroBitDigitalPin
Expand Down
2 changes: 1 addition & 1 deletion docs/uart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Functions
* 115200

The ``bits`` defines the size of bytes being transmitted, and the board
only supports 8. The ``parity`` parameter defines how partity is checked,
only supports 8. The ``parity`` parameter defines how parity is checked,
and it can be ``None``, ``microbit.uart.ODD`` or ``microbit.uart.EVEN``.
The ``stop`` parameter tells the number of stop bits, and has to be 1 for
this board.
Expand Down
4 changes: 2 additions & 2 deletions examples/conway.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def conway_step():
global arena1, arena2
for i in range(5 * 5): # loop over pixels
i = 8 + (i // 5) * 7 + i % 5
# count number of neigbours
# count number of neighbours
num_neighbours = (arena1[i - 8] +
arena1[i - 7] +
arena1[i - 6] +
Expand All @@ -37,7 +37,7 @@ def conway_step():
if self and not (2 <= num_neighbours <= 3):
arena2[i] = 0 # not enough, or too many neighbours: cell dies
elif not self and num_neighbours == 3:
arena2[i] = 1 # exactly 3 neigbours around an empty cell: cell is born
arena2[i] = 1 # exactly 3 neighbours around an empty cell: cell is born
else:
arena2[i] = self # stay as-is
# swap the buffers (arena1 is now the new one to display)
Expand Down
8 changes: 4 additions & 4 deletions examples/watch.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@
modes = {0:"clock", 1:"set h", 2:"mx10", 3:"m"}


def decode_time(miliseconds):
"""Converts a time in miliseconds into a string with hours:minutes,"""
mins = int(miliseconds / (1000 * 60) % 60)
hrs = int(miliseconds / (1000 * 60 * 60) % 24)
def decode_time(milliseconds):
"""Converts a time in milliseconds into a string with hours:minutes,"""
mins = int(milliseconds / (1000 * 60) % 60)
hrs = int(milliseconds / (1000 * 60 * 60) % 24)
return "{h:0>2}:{m:0>2}".format(h=hrs, m=mins)


Expand Down

0 comments on commit a9deb1a

Please sign in to comment.