Skip to content

Commit b6f232c

Browse files
docs: Improve microbit.scale example with accelerometer input. (#772)
1 parent 7fc33d1 commit b6f232c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/microbit.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Functions
4747
floating point number.
4848
If they are both integers (i.e ``10``), it will return an integer::
4949

50-
returns_int = scale(accelerometer.get_x(), from_=(0, 2000), to=(0, 255))
50+
returns_int = scale(accelerometer.get_x(), from_=(-2000, 2000), to=(0, 255))
5151

5252
Negative scaling is also supported, for example
5353
``scale(25, from_=(0, 100), to=(0, -200))`` will return ``-50``.

0 commit comments

Comments
 (0)