From 1dc8e92d4f4a3043e42f2e3a0212c0e2675362a7 Mon Sep 17 00:00:00 2001 From: "Mark A. Yoder" <Mark.A.Yoder@Rose-Hulman.edu> Date: Mon, 12 Jun 2023 12:11:01 -0400 Subject: [PATCH] Updated to bootlin --- books/beaglebone-cookbook/08realtime/realtime.rst | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/books/beaglebone-cookbook/08realtime/realtime.rst b/books/beaglebone-cookbook/08realtime/realtime.rst index cba4820d..dda83f3f 100644 --- a/books/beaglebone-cookbook/08realtime/realtime.rst +++ b/books/beaglebone-cookbook/08realtime/realtime.rst @@ -28,7 +28,7 @@ JavaScript and moving up with increasing speed (and effort) to using the PRUs. .. _realtime_JavaScript: -I/O with JavaScript +I/O with Python and JavaScript ==================== Problem @@ -77,12 +77,12 @@ pushbutton, and turns on the LED attached to *P9_12* when the button is pushed. :download:`pushLED.js <../code/08realtime/pushLED.js>` -Add the code to a file named ``pushLED.js`` and run it by using the following commands: +Add the code to a file named ``pushLED.py`` and run it by using the following commands: .. code-block:: bash - bone$ chmod *x pushLED.js - bone$ ./pushLED.js + bone$ chmod *x pushLED.py + bone$ ./pushLED.py data = 0 data = 0 data = 1 @@ -104,8 +104,9 @@ You want to use the C language to process inputs in real time, or Python/JavaScr Solution --------- -:ref:`realtime_JavaScript` shows how to control an LED with a pushbutton using JavaScript. This recipe accomplishes -the same thing using C. It does it in the same way, opening the correct /sys/class/gpio files and reading an writing them. +:ref:`realtime_JavaScript` shows how to control an LED with a pushbutton using Python and JavaScript. +This recipe accomplishes the same thing using C. +It does it in the same way, opening the correct /sys/class/gpio files and reading an writing them. Wire up the pushbutton and LED as shown in :ref:`realtime_pushLED_fig`. Then add the code in :ref:`realtime_pushLED_c_code` to a file named ``pushLED.c``. @@ -162,7 +163,7 @@ First, download and install *devmem2*: .. code-block:: bash - bone$ wget http://free-electrons.com/pub/mirror/devmem2.c + bone$ wget http://bootlin.com/pub/mirror/devmem2.c bone$ gcc -o devmem2 devmem2.c bone$ sudo mv devmem2 /usr/bin -- GitLab