doc: add battery

Fixes #114

- reorganize common classes in fake API such as Display, Speaker and Battery.
- This does not change the user API
This commit is contained in:
Laurens Valk
2019-03-01 14:25:56 +01:00
parent 5dde48cc57
commit 0cc04f40b8
2 changed files with 23 additions and 0 deletions
+7
View File
@@ -50,3 +50,10 @@ Display
.. automethod:: ev3brick.display.text
.. automethod:: ev3brick.display.image
Battery
-------
.. automethod:: ev3brick.battery.voltage
.. automethod:: ev3brick.battery.current
+16
View File
@@ -111,3 +111,19 @@ frequency: Hz
Sound frequencies are expressed in Hertz (Hz).
For example, you can choose the frequency of a :meth:`beep <.ev3brick.sound.beep>` to change the pitch.
.. _voltage:
voltage: mV
--------------
Voltages are expressed in millivolt (mV).
For example, you can check the voltage of the :meth:`battery <.ev3brick.battery.voltage>`.
.. _current:
current: mA
--------------
Electrical currents are expressed in milliampere (mA).
For example, you can check the current supplied by the :meth:`battery <.ev3brick.battery.current>`.