From ed396da005fcc9b8132545e43056d92a4b2be057 Mon Sep 17 00:00:00 2001 From: "Mark A. Yoder" <Mark.A.Yoder@Rose-Hulman.edu> Date: Wed, 28 Jun 2023 17:14:17 -0400 Subject: [PATCH] More group tabs --- .../beaglebone-cookbook/02sensors/sensors.rst | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/books/beaglebone-cookbook/02sensors/sensors.rst b/books/beaglebone-cookbook/02sensors/sensors.rst index e43b4be1..28d0d752 100644 --- a/books/beaglebone-cookbook/02sensors/sensors.rst +++ b/books/beaglebone-cookbook/02sensors/sensors.rst @@ -170,21 +170,26 @@ or both on the Bone, as shown in :ref:`js_pushbutton_fig`. The code in :ref:`py_pushbutton_code` reads GPIO port *P9_42*, which is attached to the pushbutton. -.. _py_pushbutton_code: +.. tabs:: + .. group-tab:: Python -.. literalinclude:: ../code/02sensors/pushbutton.py - :caption: Monitoring a pushbutton (pushbutton.py) - :linenos: + .. _py_pushbutton_code: + + .. literalinclude:: ../code/02sensors/pushbutton.py + :caption: Monitoring a pushbutton (pushbutton.py) + :linenos: -:download:`pushbutton.py <../code/02sensors/pushbutton.py>` + :download:`pushbutton.py <../code/02sensors/pushbutton.py>` -.. _c_pushbutton_code: + .. group-tab:: c -.. literalinclude:: ../code/02sensors/pushbutton.c - :caption: Monitoring a pushbutton (pushbutton.c) - :linenos: + .. _c_pushbutton_code: + + .. literalinclude:: ../code/02sensors/pushbutton.c + :caption: Monitoring a pushbutton (pushbutton.c) + :linenos: -:download:`pushbutton.c <../code/02sensors/pushbutton.c>` + :download:`pushbutton.c <../code/02sensors/pushbutton.c>` Put this code in a file called *pushbutton.py* following the steps in :ref:`sensors_getting_started`. In the VSC *bash* tab, run it by using the following commands: -- GitLab