From 2f0d7ec0a28f0af3532c87c4dd47c28285357765 Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Fri, 4 Jan 2019 15:05:17 +0100 Subject: [PATCH] doc: brick, sound, display, and experiment with samples --- source/brick.rst | 55 ++++++++++++++++++++++++++++++++++++++++++ source/devices.rst | 30 +++++++++++++++++++++++ source/ev3brick.rst | 37 ---------------------------- source/ev3devices.rst | 30 ----------------------- source/index.rst | 4 +-- source/parameters.rst | 1 - source/signaltypes.rst | 7 ++++++ 7 files changed, 94 insertions(+), 70 deletions(-) create mode 100644 source/brick.rst create mode 100644 source/devices.rst delete mode 100644 source/ev3brick.rst delete mode 100644 source/ev3devices.rst diff --git a/source/brick.rst b/source/brick.rst new file mode 100644 index 0000000..c25574a --- /dev/null +++ b/source/brick.rst @@ -0,0 +1,55 @@ +:mod:`brick` -- The EV3 Programmable Brick +========================================== + + +Buttons +------- + +.. autofunction:: brick.buttons + + +Light +----- + +.. autofunction:: brick.light + + + +Sound +----- + +.. automethod:: brick.sound.beep + + +.. automethod:: brick.sound.beeps + + +.. automethod:: brick.sound.tune + + +.. automethod:: brick.sound.file + + +.. automethod:: brick.sound.speak + + +Display +------- +:: + + x + --------------> + (0, 0) __________________ + | | + | | | + y | | Hello | + | | World | + v | | + |__________________| + (177, 127) + +.. automethod:: brick.display.clear + +.. automethod:: brick.display.text + +.. automethod:: brick.display.image diff --git a/source/devices.rst b/source/devices.rst new file mode 100644 index 0000000..cbcbc94 --- /dev/null +++ b/source/devices.rst @@ -0,0 +1,30 @@ +:mod:`devices` -- EV3 Motors and Sensors +=========================================== + +Motors +------ + +.. autoclass:: devices.Motor + +Sensors +------- + +Touch Sensor +^^^^^^^^^^^^ +.. autoclass:: devices.TouchSensor + +Color Sensor +^^^^^^^^^^^^ +.. autoclass:: devices.ColorSensor + +Infrared Sensor and Beacon +^^^^^^^^^^^^^^^^^^^^^^^^^^ +.. autoclass:: devices.InfraredSensor + +Ultrasonic Sensor +^^^^^^^^^^^^^^^^^ +.. autoclass:: devices.UltrasonicSensor + +Gyroscopic Sensor +^^^^^^^^^^^^^^^^^ +.. autoclass:: devices.GyroSensor diff --git a/source/ev3brick.rst b/source/ev3brick.rst deleted file mode 100644 index 4d5e43e..0000000 --- a/source/ev3brick.rst +++ /dev/null @@ -1,37 +0,0 @@ -:mod:`ev3brick` -- The Programmable Brick -========================================= - - -Buttons -------- - -.. autofunction:: ev3brick.buttons - -Light ------ - -.. autofunction:: ev3brick.light - -Sound ------ - -.. automethod:: ev3brick.sound.beep - -.. automethod:: ev3brick.sound.beeps - -.. automethod:: ev3brick.sound.tune - -.. automethod:: ev3brick.sound.file - -.. automethod:: ev3brick.sound.speak - -Display -------- - -TODO: picture with (0,0), +x +y arrows - -.. automethod:: ev3brick.display.clear - -.. automethod:: ev3brick.display.text - -.. automethod:: ev3brick.display.image diff --git a/source/ev3devices.rst b/source/ev3devices.rst deleted file mode 100644 index 7fa8cb8..0000000 --- a/source/ev3devices.rst +++ /dev/null @@ -1,30 +0,0 @@ -:mod:`ev3devices` -- Motors and Sensors -=========================================== - -Motors ------- - -.. autoclass:: ev3devices.Motor - -Sensors -------- - -Touch Sensor -^^^^^^^^^^^^ -.. autoclass:: ev3devices.TouchSensor - -Color Sensor -^^^^^^^^^^^^ -.. autoclass:: ev3devices.ColorSensor - -Infrared Sensor and Beacon -^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. autoclass:: ev3devices.InfraredSensor - -Ultrasonic Sensor -^^^^^^^^^^^^^^^^^ -.. autoclass:: ev3devices.UltrasonicSensor - -Gyroscopic Sensor -^^^^^^^^^^^^^^^^^ -.. autoclass:: ev3devices.GyroSensor diff --git a/source/index.rst b/source/index.rst index 14d60b6..cd771cb 100644 --- a/source/index.rst +++ b/source/index.rst @@ -18,8 +18,8 @@ Welcome to Pybricks's documentation! :maxdepth: 1 :caption: Modules: - ev3brick - ev3devices + brick + devices parameters tools diff --git a/source/parameters.rst b/source/parameters.rst index 7a33bad..1eb1f9c 100644 --- a/source/parameters.rst +++ b/source/parameters.rst @@ -20,7 +20,6 @@ Intro :no-members: .. autoclass:: parameters.Pattern - :no-members: .. autoclass:: parameters.Align :no-members: diff --git a/source/signaltypes.rst b/source/signaltypes.rst index ba9ef79..000fe93 100644 --- a/source/signaltypes.rst +++ b/source/signaltypes.rst @@ -61,3 +61,10 @@ TODO definition of physical quantity and units and :py:obj:`float` type frequency: Hz -------------- TODO definition of physical quantity and units and :py:obj:`float` type + + +.. _colortuple: + +custom color +-------------- +TODO definition of physical quantity and units and :py:obj:`float` type