.. include:: pictures.rst Synchronous (blocking) interface ******************************** For simple access to a robot, one can use a synchronous (blocking) interface. This interface is :py:class:`robot object ` obtained by :py:meth:`~ozobot.get_robot` method where argument ``coro`` is set to ``False`` (default). All members of this robot object are designed to wait (block) till the command is completed. For example :py:meth:`~ozobot.advanced.sounds.play_note` plays a note and waits till the note is played. Next command is executed after the previous one finishes. .. automodule:: ozobot.advanced .. autoclass:: Bot :members: :exclude-members: sensors, button Robot LED lights ================ .. autoclass:: BotLightEffects :members: Robot sound system ================== Basic sounds ------------ .. autoclass:: BotSounds :members: Emotions sounds --------------- .. autoclass:: BotSoundsEmotions :members: Robot movement ============== .. autoclass:: BotMovement :members: Robot navigation system ======================= .. autoclass:: BotNavigation :members: .. Robot sensors .. ============= .. .. .. autoclass:: BotSensors .. :members: .. Button .. ====== .. .. .. autoclass:: BotButton .. :members: Asynchronous (coroutine) interface ********************************** This interface provides the same functionality as `Synchronous (blocking) interface`_, but provides so called :term:`Coroutines` instead of standard blocking methods. These :term:`Coroutines` are designed to be able to be used with :py:mod:`~ozobot.asyncio` module which provides an interface for :term:`Cooperative scheduling` in :term:`Python`. .. automodule:: ozobot.advanced :noindex: .. autoclass:: BotAsync :members: :exclude-members: sensors, button Robot LED lights (coroutines) ============================= .. autoclass:: BotLightEffectsAsync :members: Robot sound system (coroutines) =============================== Basic sounds (coroutines) ------------------------- .. autoclass:: BotSoundsAsync :members: Emotions sounds (coroutines) ---------------------------- .. autoclass:: BotSoundsEmotionsAsync :members: Robot movement (coroutines) =========================== .. autoclass:: BotMovementAsync :members: Robot navigation system (coroutines) ==================================== .. autoclass:: BotNavigationAsync :members: .. Robot sensors (coroutines) .. ========================== .. .. .. autoclass:: BotSensorsAsync .. :members: .. Button (coroutines) .. =================== .. .. .. autoclass:: BotButtonAsync .. :members: