diff --git a/books/beaglebone-cookbook/02sensors/sensors.rst b/books/beaglebone-cookbook/02sensors/sensors.rst
index e43b4be1f96ee4fd9b79036c93021fd114c3b2da..28d0d7524e1b81a3a24406d3df2da269604564d6 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: