diff --git a/doc/api/hubs/index.rst b/doc/api/hubs/index.rst index 0368589..313efd7 100644 --- a/doc/api/hubs/index.rst +++ b/doc/api/hubs/index.rst @@ -10,7 +10,6 @@ movehub cityhub technichub - primehub ev3brick .. pybricks-classlink:: MoveHub @@ -31,18 +30,6 @@ :height: 10 em :target: technichub.html -.. pybricks-classlink:: PrimeHub - -.. figure:: ../../api/images/primehub.png - :height: 10 em - :target: primehub.html - -.. pybricks-classlink:: InventorHub - -.. figure:: ../../api/images/inventorhub.png - :height: 10 em - :target: primehub.html - .. pybricks-classlink:: EV3Brick .. figure:: ../../api/images/ev3brick.png diff --git a/doc/api/hubs/primehub.rst b/doc/api/hubs/primehub.rst deleted file mode 100644 index 8df35c3..0000000 --- a/doc/api/hubs/primehub.rst +++ /dev/null @@ -1,210 +0,0 @@ -Prime Hub / Inventor Hub -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. figure:: ../../api/images/primeinventorhub.png - :height: 15 em - -.. class:: InventorHub - - This class is the same as the ``PrimeHub`` class, shown below. Both classes - work on both hubs. - - These hubs are completely identical. They use the same Pybricks firmware. - -.. autoclass:: pybricks.hubs.PrimeHub - :no-members: - - .. rubric:: Using the hub status light - - .. figure:: ../../api/images/primehub_light_label.png - :width: 22 em - - .. automethod:: pybricks.hubs::PrimeHub.light.on - - .. automethod:: pybricks.hubs::PrimeHub.light.off - - .. automethod:: pybricks.hubs::PrimeHub.light.blink - - .. automethod:: pybricks.hubs::PrimeHub.light.animate - - .. rubric:: Using the light matrix display - - .. figure:: ../../api/images/primehub_display_label.png - :width: 22 em - - .. automethod:: pybricks.hubs::PrimeHub.display.orientation - - .. automethod:: pybricks.hubs::PrimeHub.display.off - - .. automethod:: pybricks.hubs::PrimeHub.display.pixel - - .. automethod:: pybricks.hubs::PrimeHub.display.image - - .. automethod:: pybricks.hubs::PrimeHub.display.animate - - .. automethod:: pybricks.hubs::PrimeHub.display.number - - .. automethod:: pybricks.hubs::PrimeHub.display.char - - .. automethod:: pybricks.hubs::PrimeHub.display.text - - .. rubric:: Using the buttons - - .. figure:: ../../api/images/primehub_buttons_label.png - :width: 22 em - - .. automethod:: pybricks.hubs::PrimeHub.buttons.pressed - - .. rubric:: Using the IMU - - .. automethod:: pybricks.hubs::PrimeHub.imu.up - - .. automethod:: pybricks.hubs::PrimeHub.imu.tilt - - .. automethod:: pybricks.hubs::PrimeHub.imu.acceleration - - .. automethod:: pybricks.hubs::PrimeHub.imu.angular_velocity - - .. automethod:: pybricks.hubs::PrimeHub.imu.heading - - .. automethod:: pybricks.hubs::PrimeHub.imu.reset_heading - - .. rubric:: Using the speaker - - .. automethod:: pybricks.hubs::PrimeHub.speaker.beep - - .. automethod:: pybricks.hubs::PrimeHub.speaker.play_notes - - .. rubric:: Using the battery - - .. automethod:: pybricks.hubs::PrimeHub.battery.voltage - - .. automethod:: pybricks.hubs::PrimeHub.battery.current - -.. note:: The examples below use the ``PrimeHub`` class. The examples work fine - on both hubs because they are the identical. If you prefer, you can - change this to ``InventorHub``. - -Status light examples ---------------------- - -Turning the light on and off -**************************** - -.. literalinclude:: - ../../../examples/pup/hub_primehub/light_off.py - -Changing brightness and using custom colors -******************************************* - -.. literalinclude:: - ../../../examples/pup/hub_primehub/light_hsv.py - -Making the light blink -********************** - -.. literalinclude:: - ../../../examples/pup/hub_primehub/light_blink.py - -Creating light animations -************************* - -.. literalinclude:: - ../../../examples/pup/hub_primehub/light_animate.py - -Matrix display examples ------------------------ - -Displaying images -***************** - -.. literalinclude:: - ../../../examples/pup/hub_primehub/display_image.py - -Displaying numbers -****************** - -.. literalinclude:: - ../../../examples/pup/hub_primehub/display_number.py - -Displaying text -*************** - -.. literalinclude:: - ../../../examples/pup/hub_primehub/display_text.py - -Displaying individual pixels -**************************** - -.. literalinclude:: - ../../../examples/pup/hub_primehub/display_pixel.py - -Changing the display orientation -******************************** - -.. literalinclude:: - ../../../examples/pup/hub_primehub/display_orientation.py - -.. literalinclude:: - ../../../examples/pup/hub_primehub/display_orientation_imu.py - -Making your own images -********************** - -.. literalinclude:: - ../../../examples/pup/hub_primehub/display_matrix.py - -Combining images to make expressions -************************************ - -.. literalinclude:: - ../../../examples/pup/hub_primehub/display_expression.py - -Displaying animations -********************* - -.. literalinclude:: - ../../../examples/pup/hub_primehub/display_animate.py - -Button examples ---------------- - -Detecting button presses -************************ - -.. literalinclude:: - ../../../examples/pup/hub_primehub/button_main.py - -IMU examples ---------------- - -Testing which way is up -******************************** - -.. literalinclude:: - ../../../examples/pup/hub_primehub/imu_up.py - - -Reading the tilt value -******************************** - -.. literalinclude:: - ../../../examples/pup/hub_primehub/imu_tilt.py - -Using a custom hub orientation -************************************************** - -.. literalinclude:: - ../../../examples/pup/hub_primehub/imu_tilt_blast.py - -Reading acceleration and angular velocity vectors -************************************************** - -.. literalinclude:: - ../../../examples/pup/hub_primehub/imu_read_vector.py - -Reading acceleration and angular velocity on one axis -***************************************************** - -.. literalinclude:: - ../../../examples/pup/hub_primehub/imu_read_scalar.py diff --git a/doc/ide/hubs/index.rst b/doc/ide/hubs/index.rst index 1fa912c..e7320ca 100644 --- a/doc/ide/hubs/index.rst +++ b/doc/ide/hubs/index.rst @@ -10,7 +10,6 @@ movehub cityhub technichub - primehub .. pybricks-classlink:: MoveHub @@ -30,14 +29,3 @@ :height: 10 em :target: technichub.html -.. pybricks-classlink:: PrimeHub - -.. figure:: ../../api/images/primehub.png - :height: 10 em - :target: primehub.html - -.. pybricks-classlink:: InventorHub - -.. figure:: ../../api/images/inventorhub.png - :height: 10 em - :target: primehub.html diff --git a/doc/ide/hubs/primehub.rst b/doc/ide/hubs/primehub.rst deleted file mode 100644 index b562095..0000000 --- a/doc/ide/hubs/primehub.rst +++ /dev/null @@ -1 +0,0 @@ -.. include:: ../../api/hubs/primehub.rst diff --git a/doc/ide/index.rst b/doc/ide/index.rst index 6eebdaf..8c45944 100644 --- a/doc/ide/index.rst +++ b/doc/ide/index.rst @@ -30,7 +30,7 @@ commonly used devices and classes are listed below for quick reference. .. rubric:: Programmable Hubs -.. figure:: ../api/images/hubsoverview.png +.. figure:: ../api/images/powereduphubs.png :width: 100 % :target: hubs/index.html