diff --git a/VERSION b/VERSION deleted file mode 100644 index 53b8586e270675d1739b0fef2b7330aa78de0417..0000000000000000000000000000000000000000 --- a/VERSION +++ /dev/null @@ -1,5 +0,0 @@ -VERSION_MAJOR = 1 -VERSION_MINOR = 0 -PATCHLEVEL = -VERSION_TWEAK = -EXTRAVERSION = wip diff --git a/_templates/layout.html b/_templates/layout.html index c6be8a80aa01d3e3f9e8dc92bbf8196334d69bf8..20bea6f4b1637819f3f06b4bf2e50e6bede3a8e6 100644 --- a/_templates/layout.html +++ b/_templates/layout.html @@ -1,32 +1,79 @@ -{% extends "!layout.html" %} -{% block document %} - {% if pages_slug != "latest" %} - <div class="wy-alert wy-alert-danger"> - The <a href="{{pages_url}}/latest">latest development version</a> - of this page may be more current than this released {{ version }} version. - </div> - {% else %} - <div class="wy-alert wy-alert-danger"> - This is the latest (main) BeagleBoard documentation. - If you are looking for stable releases, use the - drop-down menu on the bottom-left and select the desired version. - </div> - {% endif %} - {{ super() }} -{% endblock %} -{% block menu %} - {% include "versions.html" %} - {{ super() }} - {% if reference_links %} - <div class="toctree-wrapper compound"> - <p class="caption"><span class="caption-text">Reference</span></p> - <ul> - {% for title, url in reference_links.items() %} - <li class="toctree-l1"> - <a class="reference internal" href="{{ url }}">{{ title }}</a> - </li> - {% endfor %} - </ul> - </div> - {% endif %} -{% endblock %} +{% extends "pydata_sphinx_theme/layout.html" %} + +{% block docs_navbar %} + + <!-- Top version and announcement message --> + <script> + + // Function to check for the next div and clear it or create it if not available + function getBannerDiv() { + // Get the first element with the class 'search-button__wrapper' + const sbw = document.getElementsByClassName('search-button__wrapper'); + + // Ensure the collection is not empty to avoid errors + if (sbw.length > 0) { + const sbwElement = sbw[0]; + const nextElement = sbwElement.nextElementSibling; + + // Check if the next element exists and has the class 'pst-async-banner-revealer' + if (nextElement && nextElement.classList.contains('pst-async-banner-revealer')) { + // Clear the content of the next element + nextElement.innerHTML = ''; + } else { + // Create a new div with the required class and style if it doesn't exist + const newDiv = document.createElement('div'); + newDiv.className = 'pst-async-banner-revealer'; + newDiv.style.height = 'auto'; + sbwElement.insertAdjacentElement('afterend', newDiv); + return newDiv; // Return the newly created div + } + return nextElement; // Return the existing element + } else { + console.error("No elements with the class 'search-button__wrapper' found."); + return null; + } + } + + // Function to generate version and announcement banner HTML + function getBannerHTML() { + return ` + {% if 'docs.beagleboard.org' not in docs_url%} + <aside id="bd-header-version-warning" class="d-print-none" aria-label="Version warning"> + <div class="bd-header-announcement__content ms-auto me-auto"> + <div class="sidebar-message"> + {{ current_url }} + {% if '/docs.beagleboard.io/' in docs_url %} + {{forked_version_message}} + {% elif 'docs.beagleboard.io' in docs_url %} + {{development_version_message}} + {% else %} + {{unknown_version_message}} + {% endif %} + <a class="btn text-wrap font-weight-bold ms-3 my-1 align-baseline pst-button-link-to-stable-version" href="{{version_link}}"> + {{version_link_text}} + </a> + </div> + </div> + </aside> + {% endif %} + {% if announcement_message != '' %} + <aside class="bd-header-announcement" aria-label="Announcement"> + <div class="bd-header-announcement__content">{{ announcement_message }}</div> + </aside> + {% endif %} + `; + } + + // Get the target element where the banners will be added + const bannerDiv = getBannerDiv(); + + // Add version banner and announcement banner if bannerDiv is valid + if (bannerDiv) { + bannerDiv.innerHTML = getBannerHTML(); + } + + </script> + + {{ super() }} + +{% endblock docs_navbar %} diff --git a/_templates/message.html b/_templates/message.html index e5e87a324fbd5ea7a59e0f253225795a9899f932..ff2e99f513bef35f745d899fc8ddfc6a72ffff04 100644 --- a/_templates/message.html +++ b/_templates/message.html @@ -5,4 +5,4 @@ is all about being open, please discuss in public on our <a href="https://forum.beagleboard.org" target="_blank">forum</a>!</p> </div> -</div> \ No newline at end of file +</div> diff --git a/_templates/todo.html b/_templates/todo.html new file mode 100644 index 0000000000000000000000000000000000000000..d2f21803b19a5d6a858f4540cd17417f6146bec5 --- /dev/null +++ b/_templates/todo.html @@ -0,0 +1,49 @@ +<a role="button" data-bs-toggle="modal" data-bs-target="#todoModal" href="#" id="modalfortodoitems"> + <button type="button" class="btn btn-danger">Outstanding todo items</button> +</a> + +<div class="modal fade" id="todoModal" aria-labelledby="todoModalLabel" aria-hidden="true"> + <div class="modal-dialog modal-lg modal-dialog-centered"> + <div class="modal-content"> + <div class="modal-header"> + <h5 class="modal-title m-0 text-dark" id="todoModalLabel">Outstanding todo items</h5> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> + </div> + <div class="modal-body"> + <ul class="list-group list-group-flush" id="todolist"> + <!-- Auto generated for page --> + </ul> + </div> + </div> + </div> +</div> + +<script> + + document.body.appendChild(document.getElementById('todoModal')); + var modalfortodoitems = document.getElementById('modalfortodoitems'); + var modalfortodoitemsparent = modalfortodoitems.parentNode; + var todoItems = document.getElementsByClassName('admonition-todo'); + var todolist = document.getElementById('todolist') + + if(todoItems.length == 0 || !todoItems[0].hasAttribute('id')) { + modalfortodoitemsparent.remove(); + } else { + for (var i = 0; i < todoItems.length; ++i) { + var todoItem = document.createElement('li'); + var link = document.createElement('a'); + link.textContent = todoItems[i].getElementsByTagName('p')[1].innerHTML; + link.href = '#' + todoItems[i].id; + link.addEventListener('click', function() { + // Use Bootstrap's modal method to hide the modal + const todoModal = document.getElementById('todoModal'); + const modal = bootstrap.Modal.getInstance(todoModal); + modal.hide(); + }); + todoItem.appendChild(link); + todoItem.classList.add('list-group-item'); + todolist.appendChild(todoItem); + } + } + +</script> \ No newline at end of file diff --git a/boards/beagleconnect/freedom/05-demos.rst b/boards/beagleconnect/freedom/05-demos.rst index 06ba7f3337550d9be710726e7131bb5a7e405b80..11bd6a5f24bbb59b8a81c31e326b58000ea90b87 100644 --- a/boards/beagleconnect/freedom/05-demos.rst +++ b/boards/beagleconnect/freedom/05-demos.rst @@ -41,10 +41,23 @@ Demos & tutorials beginner + .. card:: + :link: beagleconnect-freedom-using-arduino-zephyr-template + :link-type: ref + + **Using Arduino Zephyr Template** + ^^^ + Getting started with arduino Zephyr template on your BeagleConnect Freedom board. + +++ + .. admonition:: Complexity level + + beginner + .. toctree:: - :maxdepth: 1 - :hidden: + :maxdepth: 1 + :hidden: - demos-and-tutorials/using-micropython - demos-and-tutorials/using-zephyr - demos-and-tutorials/using-greybus \ No newline at end of file + demos-and-tutorials/using-micropython + demos-and-tutorials/using-zephyr + demos-and-tutorials/using-greybus + demos-and-tutorials/using-arduino-zephyr-template \ No newline at end of file diff --git a/boards/beagleconnect/freedom/demos-and-tutorials/images/BeagleConnectFreedom-Back-Annotated-Arduino-Pinout.png b/boards/beagleconnect/freedom/demos-and-tutorials/images/BeagleConnectFreedom-Back-Annotated-Arduino-Pinout.png new file mode 100644 index 0000000000000000000000000000000000000000..c61b37c9c64b074ee09d272530387d5161f8c9a9 Binary files /dev/null and b/boards/beagleconnect/freedom/demos-and-tutorials/images/BeagleConnectFreedom-Back-Annotated-Arduino-Pinout.png differ diff --git a/boards/beagleconnect/freedom/demos-and-tutorials/images/BeagleConnectFreedom-Front-Annotated-Arduino-Pinout.png b/boards/beagleconnect/freedom/demos-and-tutorials/images/BeagleConnectFreedom-Front-Annotated-Arduino-Pinout.png new file mode 100644 index 0000000000000000000000000000000000000000..eb41452412560ecac3bcda2aac2ac5edbe9631ba Binary files /dev/null and b/boards/beagleconnect/freedom/demos-and-tutorials/images/BeagleConnectFreedom-Front-Annotated-Arduino-Pinout.png differ diff --git a/boards/beagleconnect/freedom/demos-and-tutorials/using-arduino-zephyr-template.rst b/boards/beagleconnect/freedom/demos-and-tutorials/using-arduino-zephyr-template.rst new file mode 100644 index 0000000000000000000000000000000000000000..fad69dffd52d80a8930dbb6fa84165f099b7aa1c --- /dev/null +++ b/boards/beagleconnect/freedom/demos-and-tutorials/using-arduino-zephyr-template.rst @@ -0,0 +1,200 @@ +.. _beagleconnect-freedom-using-arduino-zephyr-template: + +Using Arduino Zephyr Template +############################## + +The `Arduino Core API module for zephyr <https://github.com/zephyrproject-rtos/gsoc-2022-arduino-core>`_ leverages the power of Zephyr under an +Arduino-C++ style abstraction layer thus helping zephyr new-comers to start using +it without worrying about learning new APIs and libraries. + +Using this template you can run arduino code on your BeagleConnect Freedom. + +Pin Numbering For BeagleConnect Freedom +*************************************** + +You will see pins over ``Mikrobus-1`` and ``Mikrobus-2`` that can be used for Arduino code. +You can set each pin to either **read signals (input)** for things like buttons & +sensors or you can set them to **send signals (output)** to things like LEDs and motors. This lets you +interact with and control the physical world using Arduino code on BeagleConnect +Freedom board. + +Commonly used GPIOs are specified: + +- **D0-D18** Digital GPIO pins +- **A0-A5** ADC GPIO pins +- **D2** and **D6** PWM GPIO pins + +Reference to all GPIO pins are shown in the below images. + +.. figure:: ./images/BeagleConnectFreedom-Front-Annotated-Arduino-Pinout.png + :align: center + :alt: BeagleConnect Freedom MB1 pinout + + Mikrobus-1 front annotated arduino pinout + +.. figure:: ./images/BeagleConnectFreedom-Back-Annotated-Arduino-Pinout.png + :align: center + :alt: BeagleConnect Freedom MB2 pinout + + Mikrobus-2 back annotated arduino pinout + +Setup Arduino workspace +*********************** + +If this is your first time using zephyr, `Install Zephyr SDK <https://docs.zephyrproject.org/latest/develop/getting_started/index.html#install-the-zephyr-sdk>`_ and install ``cc1352-flasher`` +using command ``pip install cc1352-flasher`` then reboot your system before following the steps below. + +1. Create a workspace folder: + +.. code:: shell-session + + mkdir arduino-workspace + cd arduino-workspace + +2. Setup virtual environment + +.. code:: shell-session + + python -m venv .venv + source .venv/bin/activate + pip install west + +3. Setup Zephyr app: + +.. code:: shell-session + + west init -m https://openbeagle.org/beagleconnect/arduino-zephyr-template . + west update + +4. Setup Arduino module + +.. code:: shell-session + + ln -srf modules/lib/ArduinoCore-API/api modules/lib/Arduino-Zephyr-API/cores/arduino/. + +5. Install python deps + +.. code:: shell-session + + pip install -r zephyr/scripts/requirements-base.txt + +Arduino Code +============ + +You can find ``main.cpp`` file in the directory ``arduino-workspace/arduino-zephyr-template/src/`` +which contains your arduino code. The default code prints ``Hello World`` on the serial monitor. +Since you are already in the ``arduino-workspace`` directory, then proceed with writing the following code. + +.. code:: shell-session + + nano arduino-zephyr-template/src/main.cpp + +.. code-block:: shell-session + :caption: main.cpp + + #include <Arduino.h> + + void setup() { + Serial.begin(115200); + } + + void loop() { + Serial.println("Hello World"); + delay(5000); + } + +Press ``CTRL+O`` and ``ENTER`` to save, ``CTRL+X`` to exit. + +.. important:: + + You must start your ``main.cpp`` code with ``#include <Arduino.h>``. + +Build the Arduino directory +=========================== + +Before flashing, run the command below to build the ``arduino-zephyr-template`` for the board +``beagleconnect_freedom``. + +.. code:: shell-session + + west build -b beagleconnect_freedom arduino-zephyr-template -p + +.. note:: + + Only if you are following the steps from the beginning then the above command will work. + Otherwise, make sure that you are in the ``arduino-workspace`` directory and setup + virtual environment using command ``source .venv/bin/activate``. + +Flash BeagleConnect Freedom +============================ + +Make sure that your BeagleConnect Freedom is connected with your linux system +via USB. + +.. code:: shell-session + + west flash + +Serial Output +============= + +Considering your BeagleConnect Freedom is connected to ``/dev/ttyACM0`` you can see the serial output coming from your BeagleConnect Freedom. + +.. code:: shell-session + + tio /dev/ttyACM0 + +Arduino blink code running on BeagleConnect Freedom +*************************************************** + +For BeagleConnect Freedom LNK LED will work as ``LED_BUILTIN`` in Arduino code. + +First you have to modify ``main.cpp`` located in the directory ``arduino-workspace/arduino-zephyr-template/src/`` +created at the time of setup. + +.. code-block:: shell-session + :caption: main.cpp + + #include <Arduino.h> + + void setup() { + // initialize digital pin LED_BUILTIN as an output. + pinMode(LED_BUILTIN, OUTPUT); + } + + // the loop function runs over and over again forever + void loop() { + digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) + delay(1000); // wait for a second + digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW + delay(1000); // wait for a second + } + +.. note:: + + For specifying high and low output states, use ``HIGH`` and ``LOW``. Avoid using boolean ``1`` and ``0`` as they may not be compatible. + +Before doing ``Build`` and ``Flash``, you must activate the virtual environment in the ``arduino-workspace`` directory which has been created earlier. + +.. code:: shell-session + + source .venv/bin/activate + +Now, execute the build command. + +.. code:: shell-session + + west build -b beagleconnect_freedom arduino-zephyr-template -p + +Make sure your BeagleConnect Freedom is connected to your linux system via USB. + +Finally, flash using the command below. The ``LNK`` LED of BeagleConnect will start blinking after flashing +is complete. + +.. code:: shell-session + + west flash + +.. tip:: + + You can try more `Arduino examples <https://docs.arduino.cc/built-in-examples/>`_ on BeagleConnect Freedom. \ No newline at end of file diff --git a/boards/beagleconnect/freedom/index.rst b/boards/beagleconnect/freedom/index.rst index e8cfe59ab8cd2579fa4a5dbe41cd652bdf9fa31d..8140c51849d926c26b7fb4b309a0001bee911aac 100644 --- a/boards/beagleconnect/freedom/index.rst +++ b/boards/beagleconnect/freedom/index.rst @@ -3,8 +3,6 @@ BeagleConnect Freedom ##################### -:bdg-danger:`Work in progress` - BeagleConnect™ Freedom is an open-hardware wireless hardware platform developed by BeagleBoard.org and built around the TI CC1352P7 microcontroller, which supports both 2.4-GHz and long-range, low-power Sub-1 GHz wireless protocols. Rapidly prototyping of IoT applications is accelerated by hardware compatibility with over 1,000 mikroBUS add-on sensors, acutators, indicators and additional connectivity and storage options, and backed with software support utilizing the Zephyr scalable and modular real-time operating system, allowing developers diff --git a/boards/beagleplay/02-quick-start.rst b/boards/beagleplay/02-quick-start.rst index e8e0cc915008f5ebd4cc75fa771378328333cd3f..fed5076f832822a0649a00de171e60b85b23c5a9 100644 --- a/boards/beagleplay/02-quick-start.rst +++ b/boards/beagleplay/02-quick-start.rst @@ -24,7 +24,7 @@ When you purchase a brand new BeaglePlay, In the box you'll get: Attaching antennas ****************** -You can watch this video to see how to attach the attennas. +You can watch this video to see how to attach the antennas. .. youtube:: 8zeIVd-JRc0 :width: 100% @@ -54,9 +54,27 @@ For tethering to your PC you'll need a USB-C data cable. Access VSCode **************** +You can access VSCode in two ways: + +1. :ref:`beagleplay-usb-vscode` +2. :ref:`beagleplay-access-point-vscode` + +.. _beagleplay-usb-vscode: + +USB +==== + Once connected, you can browse to `192.168.7.2:3000 <http://192.168.7.2:3000>`_ to access the VSCode IDE to browse documents and start programming your BeaglePlay! +.. _beagleplay-access-point-vscode: + +Access Point +============ + +By default BeaglePlay Access Point is enabled, You can connect to ``BeaglePlay-XXXX`` Access Point with the password ``BeaglePlay`` and then +browse to `192.168.7.2:3000 <http://192.168.7.2:3000>`_ to access the VSCode IDE. + .. note:: You may get a warning about an invalid or self-signed certificate. This is a limitation of @@ -70,6 +88,9 @@ to browse documents and start programming your BeaglePlay! BeaglePlay VSCode IDE (192.168.7.2:3000) +.. tip:: + For more Wifi and Access Point related info go to :ref:`beagleplay-connect-wifi` + .. _beagleplay-demos-and-tutorials: Demos and Tutorials @@ -83,5 +104,5 @@ Demos and Tutorials * :ref:`beagleplay-oldi` * :ref:`beagleplay-csi` * :ref:`beagleplay-zephyr-development` -* :ref:`play-kernel-development` -* :ref:`play-understanding-boot` +* :ref:`beagleplay-kernel-development` +* :ref:`beagleplay-understanding-boot` diff --git a/boards/beagleplay/03-design.rst b/boards/beagleplay/03-design.rst index 500304080273230d8b00ec3c56a8516049f63abb..0fee64efc491415ec43290f28c9231dcadc2c99f 100644 --- a/boards/beagleplay/03-design.rst +++ b/boards/beagleplay/03-design.rst @@ -4,7 +4,7 @@ Design and specifications ######################### If you want to know how BeaglePlay is designed and the detailed specifications, then -this chapter is for you. We are going to attept to provide you a short and crisp overview +this chapter is for you. We are going to attempt to provide you a short and crisp overview followed by discussing each hardware design element in detail. .. tip:: @@ -151,7 +151,7 @@ General Connectivity and Expansion One of the main advantage of using a Single Board Computer (SBC) is having direct accessibility of general purpose input & output (GPIO) pins and other interfaces like I2C, SPI, ADC, PWM. Your BeaglePlay board shines in this domain as well with mikroBUS connector that can take 1000s of click board from -`MikroElektronika <https://www.mikroe.com/>`_, Grove connector allows to connect hundereds of Grove modules +`MikroElektronika <https://www.mikroe.com/>`_, Grove connector allows to connect hundreds of Grove modules from `Seeed Studio <https://www.seeedstudio.com/grove.html>`_, and QWIIC connector allows to connect I2C modules like QWIIC modules from `SparkFun <https://www.sparkfun.com/qwiic>`_ or STEMMA QT modules from `Adafruit <https://www.adafruit.com/category/1005>`_. Note that you also get one USB-A port and one USB-C port. @@ -162,7 +162,7 @@ use the pre-installed VisualStudio Code editor by putting the address ``192.168. USB A & USB C ============= -Below is the schematic of full size USB A for pripheral connection and USB C for device power & tethering. +Below is the schematic of full size USB A for peripheral connection and USB C for device power & tethering. .. figure:: images/hardware-design/usb.svg :width: 1247 @@ -231,7 +231,7 @@ Qwiic, or STEMMA QT are 4pin JST SH 1.00 connectors for easy I2C connection. :align: center :alt: QWIIC connnector for I2C modules - QWIIC connnector for I2C modules + QWIIC connector for I2C modules Buttons and LEDs **************** diff --git a/boards/beagleplay/04-expansion.rst b/boards/beagleplay/04-expansion.rst index 49f6fb193fd774131f6bb6cafb83c879813d590b..fd6c694c9eae89b250ad407c0a635f8f7bfec495 100644 --- a/boards/beagleplay/04-expansion.rst +++ b/boards/beagleplay/04-expansion.rst @@ -3,8 +3,6 @@ Expansion ######### -:bdg-danger:`Work in progress` - .. todo:: Add information on building expansion hardware for BeaglePlay. diff --git a/boards/beagleplay/05-demos.rst b/boards/beagleplay/05-demos.rst index 2fe805e66057cd3c984d33c3457b9d8f44f24e00..682c356b5aa97c5ac7b2756dc11732ced884a3d1 100644 --- a/boards/beagleplay/05-demos.rst +++ b/boards/beagleplay/05-demos.rst @@ -114,7 +114,7 @@ Demos and tutorials intermediate .. card:: - :link: play-kernel-development + :link: beagleplay-kernel-development :link-type: ref **Linux Kernel development** @@ -170,7 +170,7 @@ Demos and tutorials demos-and-tutorials/using-oldi demos-and-tutorials/using-csi demos-and-tutorials/zephyr-cc1352-development - demos-and-tutorials/play-kernel-development + demos-and-tutorials/beagleplay-kernel-development demos-and-tutorials/greybus-host demos-and-tutorials/understanding-boot demos-and-tutorials/low-power-video-doorbell diff --git a/boards/beagleplay/demos-and-tutorials/play-kernel-development.rst b/boards/beagleplay/demos-and-tutorials/beagleplay-kernel-development.rst similarity index 98% rename from boards/beagleplay/demos-and-tutorials/play-kernel-development.rst rename to boards/beagleplay/demos-and-tutorials/beagleplay-kernel-development.rst index f74d9b3977971608852b48bfb981e2b34ad4b775..bb88c2c0d9422bf662dd203d9ab17bbf3e44ead6 100644 --- a/boards/beagleplay/demos-and-tutorials/play-kernel-development.rst +++ b/boards/beagleplay/demos-and-tutorials/beagleplay-kernel-development.rst @@ -1,4 +1,4 @@ -.. _play-kernel-development: +.. _beagleplay-kernel-development: BeaglePlay Kernel Development ############################# @@ -151,7 +151,7 @@ on `debugging with JTAG in CCS <https://www.ti.com/video/3874392631001?keyMatch= References ********** -- To understand more about booting code on BeaglePlay, see :ref:`play-understanding-boot`. +- To understand more about booting code on BeaglePlay, see :ref:`beagleplay-understanding-boot`. - For more details on the Linux kernel build system, see `The kernel build system <https://www.kernel.org/doc/html/latest/kbuild/index.html>`_ on kernel.org. diff --git a/boards/beagleplay/demos-and-tutorials/connect-wifi.rst b/boards/beagleplay/demos-and-tutorials/connect-wifi.rst index 200f12d8b1420c90f77942e767ce2244b0123309..4eef8a45d4c0233c972c8e81d8b1d3712fadf203 100644 --- a/boards/beagleplay/demos-and-tutorials/connect-wifi.rst +++ b/boards/beagleplay/demos-and-tutorials/connect-wifi.rst @@ -114,7 +114,7 @@ Let's see the ``wpa_gui`` interface in detail, Step 3: Scanning & Connecting to WiFi access points ==================================================== -To scan the WiFi access points around you, just click on ``Scan`` button availale under +To scan the WiFi access points around you, just click on ``Scan`` button available under ``wpa_gui > Current Status > Scan``. .. figure:: ../images/wpa_gui_step3a.* @@ -209,7 +209,7 @@ wpa_cli (XFCE) Another way of connecting to a WiFi access point is to edit the ``wpa_supplicant`` configuration file. -Step 1: Open up termina +Step 1: Open up terminal ======================== Open up a terminal window either from ``Applications > Terminal Emulator`` Or from Task Manager. @@ -309,7 +309,7 @@ after you add the credentials to ``wpa_supplicant-wlan0.conf``. Disabling the WIFI Access Point ******************************* -In certain situations, such as running HomeAssistant, you may chose to connect your BeaglePlay to the internet via Ethernet. In this case, it may be desireable to disable it's Wifi access point so that users outside the local network aren't able to connect to it. +In certain situations, such as running HomeAssistant, you may chose to connect your BeaglePlay to the internet via Ethernet. In this case, it may be desirable to disable it's Wifi access point so that users outside the local network aren't able to connect to it. The Wifi Access Point that BeaglePlay provides is started using `uDev rules <https://en.wikipedia.org/wiki/Udev>`_. created by the `bb-wlan0-defaults` package diff --git a/boards/beagleplay/demos-and-tutorials/images/qwiic/beagleplay-qwiic-oled-connection.webp b/boards/beagleplay/demos-and-tutorials/images/qwiic/beagleplay-qwiic-oled-connection.webp new file mode 100644 index 0000000000000000000000000000000000000000..683bb28a02ddc4a42ef663a6a1fefe527149225c Binary files /dev/null and b/boards/beagleplay/demos-and-tutorials/images/qwiic/beagleplay-qwiic-oled-connection.webp differ diff --git a/boards/beagleplay/demos-and-tutorials/images/qwiic/beagleplay-qwiic-oled-helloworld.webp b/boards/beagleplay/demos-and-tutorials/images/qwiic/beagleplay-qwiic-oled-helloworld.webp new file mode 100644 index 0000000000000000000000000000000000000000..a8a1cf34d35c3646589f64004996f8e41b6ec603 Binary files /dev/null and b/boards/beagleplay/demos-and-tutorials/images/qwiic/beagleplay-qwiic-oled-helloworld.webp differ diff --git a/boards/beagleplay/demos-and-tutorials/images/qwiic/beagleplay-qwiic-oled-ipaddress.webp b/boards/beagleplay/demos-and-tutorials/images/qwiic/beagleplay-qwiic-oled-ipaddress.webp new file mode 100644 index 0000000000000000000000000000000000000000..99da8d25721001bb0e2fafbe23311806ef59edb0 Binary files /dev/null and b/boards/beagleplay/demos-and-tutorials/images/qwiic/beagleplay-qwiic-oled-ipaddress.webp differ diff --git a/boards/beagleplay/demos-and-tutorials/using-mikrobus.rst b/boards/beagleplay/demos-and-tutorials/using-mikrobus.rst index e0209c3f42d1b8c9d731a4b4281cb0590a2cd77c..f8ec8cbf859d33d2268b210e05debe18063dbed4 100644 --- a/boards/beagleplay/demos-and-tutorials/using-mikrobus.rst +++ b/boards/beagleplay/demos-and-tutorials/using-mikrobus.rst @@ -39,7 +39,7 @@ BeaglePlay's Linux kernel is patched with a mikrobus driver that automatically r Does my add-on have ClickID? ============================ -Look for the "ID" logo on the board. It's near PWM pin on upper right hand side in the illustration shown below. +Look for the board's ``'D`` (ID) logo. It's near the PWM pin on the upper right-hand side in the illustration below. .. figure:: images/mikrobus-linux-board-illustration.png :width: 940 @@ -54,34 +54,40 @@ Example of examining boot log to see a ClickID was detected. .. code:: shell-session - debian@BeaglePlay:~$ dmesg | grep mikrobus - [ 2.096254] mikrobus:mikrobus_port_register: registering port mikrobus-0 - [ 2.096325] mikrobus mikrobus-0: mikrobus port 0 eeprom empty probing default eeprom - [ 2.663698] mikrobus_manifest:mikrobus_manifest_attach_device: parsed device 1, driver=opt3001, protocol=3, reg=44 - [ 2.663711] mikrobus_manifest:mikrobus_manifest_parse: Ambient 2 Click manifest parsed with 1 devices - [ 2.663783] mikrobus mikrobus-0: registering device : opt3001 - -To use the add-on, see :ref:`beagleplay-mikrobus-using`. + debian@BeaglePlay:~$ dmesg | grep mikrobus + [ 2.096254] mikrobus:mikrobus_port_register: registering port mikrobus-0 + [ 2.096325] mikrobus mikrobus-0: mikrobus port 0 eeprom empty probing default eeprom + [ 2.663698] mikrobus_manifest:mikrobus_manifest_attach_device: parsed device 1, driver=opt3001, protocol=3, reg=44 + [ 2.663711] mikrobus_manifest:mikrobus_manifest_parse: Ambient 2 Click manifest parsed with 1 devices + [ 2.663783] mikrobus mikrobus-0: registering device : opt3001 .. note:: + + Not all Click boards with ClickID have valid ``manifest`` entries. + Then you can follow :ref:`beagleplay-mikrobus-clickid-inavalid-manifests` to make your + add-on detected. - Not all Click boards with ClickID have valid ``manifest`` entries. +To use the add-on, see :ref:`beagleplay-mikrobus-using`. .. _beagleplay-mikrobus-without-clickid: What if my add-on doesn't have ClickID? -*************************************** +======================================= +If add-on doesn't have clickID then it can not be detected directly. -It is still possible a ``manifest`` has been created for your add-on as we have created over 100 of them. +.. code:: shell-session + + debian@BeaglePlay:~$ dmesg | grep mikrobus + [ 2.123994] mikrobus:mikrobus_port_register: registering port mikrobus-0 + [ 2.124059] mikrobus mikrobus-0: mikrobus port 0 eeprom empty probing default eeprom + +Available ``manifest`` can be installed that has been created for your add-on as we have created over 100 of them. You can install the existing manifest files onto your BeaglePlay. First, make sure you have the latest manifests installed in your system. .. code:: console sudo apt update - -.. code:: console - sudo apt install bbb.io-clickid-manifests @@ -123,6 +129,13 @@ Take a look at the list of ``manifest`` files to see if the Click or other mikro COLOR-2-CLICK.mnfb HEART-RATE-7-CLICK.mnfb PROXIMITY-9-CLICK.mnfb WAVEFORM-CLICK.mnfb COLOR-7-CLICK.mnfb HEART-RATE-CLICK.mnfb PROXIMITY-CLICK.mnfb WEATHER-CLICK.mnfb +Below command to grant root privileges of the intended user and then enter passsword. +This will take you to the different shell. + +.. code:: bash + + sudo su + Then, load the appropriate ``manifest`` using the ``mikrobus`` bus driver. For example, with the Ambient 2 Click, you can write that ``manifest`` to the ``mikrobus-0`` ``new_device`` entry. @@ -130,6 +143,90 @@ you can write that ``manifest`` to the ``mikrobus-0`` ``new_device`` entry. cat /lib/firmware/mikrobus/AMBIENT-2-CLICK.mnfb > /sys/bus/mikrobus/devices/mikrobus-0/new_device +You can now exit this shell. + +.. code:: shell + + exit + +Once done, you can check it using command ``dmesg | grep mikrobus`` which shows that +add-on is now detected. + +.. code:: shell-session + + debian@BeaglePlay:~$ dmesg | grep mikrobus + [ 2.096254] mikrobus:mikrobus_port_register: registering port mikrobus-0 + [ 2.096325] mikrobus mikrobus-0: mikrobus port 0 eeprom empty probing default eeprom + [ 2.663698] mikrobus_manifest:mikrobus_manifest_attach_device: parsed device 1, driver=opt3001, protocol=3, reg=44 + [ 2.663711] mikrobus_manifest:mikrobus_manifest_parse: Ambient 2 Click manifest parsed with 1 devices + [ 2.663783] mikrobus mikrobus-0: registering device : opt3001 + +.. note:: + + It'll forget on reboot... need to have a boot service. + +.. todo:: + + To make it stick, ... + + +.. _beagleplay-mikrobus-clickid-inavalid-manifests: + +What if my add-on has invalid manifest entries? +=============================================== + +Not all Click boards with ClickID have valid manifest entries. +If your add-on has clickID but shows the command output like below. + +.. code:: shell-session + + debian@BeaglePlay:~$ dmesg | grep mikrobus + [ 2.119771] mikrobus:mikrobus_port_register: registering port mikrobus-0 + [ 2.119842] mikrobus mikrobus-0: mikrobus port 0 eeprom empty probing default eeprom + [ 2.261113] mikrobus_manifest:mikrobus_manifest_header_validate: manifest version too new (150.189 > 0.3) + [ 2.261130] mikrobus mikrobus-0: invalid manifest size -22 + +There are some available manifest that can be used to write in the eeprom of clickID board. +Once you ``sudo apt update`` and ``sudo apt install bbb.io-clickid-manifests`` then you +can see the list of manifests using command ``ls /lib/firmware/mikrobus/``. Let's take +the ``Accel Click - ClickID`` Board with invalid manifest entries, To get the valid manifest +we need to write ``ACCEL-CLICK.mnfb`` to eeprom of ClickID board using the following commands. + +First check the file name for the add-on device. It can be in the form of ``w1_bus_master1-xx-xxxxxxx``. + +.. code:: shell-session + + debian@BeaglePlay:~$ ls /sys/bus/w1/devices/ + w1_bus_master1 w1_bus_master1-xx-xxxxxxx + +Then in the following command, ``/lib/firmware/mikrobus/ACCEL-CLICK.mnfb`` is the path of manifest file and +``/sys/bus/w1/devices/w1_bus_master1-xx-xxxxxxx/mikrobus_manifest`` is path for one wire eeprom clickID board. +You must replace the the file name ``w1_bus_master1-xx-xxxxxxx`` with your clickID board file in the +below command. + +.. code:: shell-session + + debian@BeaglePlay:~$ sudo dd if=/lib/firmware/mikrobus/ACCEL-CLICK.mnfb of=/sys/bus/w1/devices/w1_bus_master1-xx-xxxxxxx/mikrobus_manifest + 0+1 records in + 0+1 records out + 132 bytes copied, 0.0144496 s, 9.1 kB/s + +Now, Reboot your BeaglePlay. After rebooting, the add-on has been detected with valid manifest entries. + +.. code:: shell-session + + debian@BeaglePlay:~$ dmesg | grep mikrobus + [ 2.126654] mikrobus:mikrobus_port_register: registering port mikrobus-0 + [ 2.126727] mikrobus mikrobus-0: mikrobus port 0 eeprom empty probing default eeprom + [ 2.797179] mikrobus_manifest:mikrobus_manifest_attach_device: parsed device 1, driver=adxl345, protocol=3, reg=1d + [ 2.797191] mikrobus_manifest:mikrobus_manifest_parse: Accel Click manifest parsed with 1 devices + [ 2.797267] mikrobus mikrobus-0: registering device : adxl345 + +.. note:: + + The updation has done in the eeprom of clickID board. It will not + forget after reboot. + .. note:: We will be adding a link to the ``mikrobus-0`` device at ``/dev/play/mikrobus`` in the near @@ -141,20 +238,91 @@ you can write that ``manifest`` to the ``mikrobus-0`` ``new_device`` entry. Patched Linux with out-of-tree Mikrobus driver: https://git.beagleboard.org/beagleboard/linux +To use the add-on, see :ref:`beagleplay-mikrobus-using`. + +.. _beagleplay-mikrobus-using: + +Accel Click Board Example +========================== + +Next, let's explore how to read raw sensor values using the Accel Click board. This step will help us understand the basics of sensor data retrieval and processing. + +First, let's check the IIO devices available. + +.. code:: shell-session + + debian@BeaglePlay:~$ ls /sys/bus/iio/devices/ + iio:device0 iio:device1 + +Considering the device ``iio:device0`` is the MikroBUS click ID connected to the BeaglePlay board. +Depending on your specific setup and device configuration, you might need to adjust the path or device +number (device0) accordingly. In this case device0 corresponds to our Accel Click, let's check its name. + +.. code:: shell-session + + debian@BeaglePlay:~$ cat /sys/bus/iio/devices/iio\:device0/name + adxl345 + +The file corresponding to the IIO device, including raw values, can be viewed using the following command: + +.. code:: shell-session + + debian@BeaglePlay:~$ ls /sys/bus/iio/devices/iio\:device0 + dev in_accel_scale in_accel_x_raw in_accel_y_raw in_accel_z_raw power subsystem + in_accel_sampling_frequency in_accel_x_calibbias in_accel_y_calibbias in_accel_z_calibbias name sampling_frequency_available uevent + +To view the raw values from the accel click (assuming ``iio:device0`` is configured correctly for your MikroBUS +click ID on the BeaglePlay board), you can use the following command: + +.. code:: shell-session + + debian@BeaglePlay:~$ cat /sys/bus/iio/devices/iio\:device0/in_accel_x_raw + 3 + +This command reads and displays the raw X-axis accelerometer data from ``iio:device0``. You can replace +``in_accel_x_raw`` with ``in_accel_y_raw`` or ``in_accel_z_raw`` to view raw data from the Y-axis or Z-axis +accelerometer channels respectively, depending on your requirements. + + +To create a script displays accelerometer raw data values from ``iio:device0`` use ``nano accelclick.sh`` command. +Copy the below script and paste it to the ``accelclick.sh`` file. It reads the raw X, Y, and Z axis values from +``/sys/bus/iio/devices/iio:device0/in_accel_x_raw``, ``/sys/bus/iio/devices/iio:device0/in_accel_y_raw``, and +``/sys/bus/iio/devices/iio:device0/in_accel_z_raw`` respectively. + +.. code:: shell-session + + X=$(cat /sys/bus/iio/devices/iio\:device0/in_accel_x_raw) + Y=$(cat /sys/bus/iio/devices/iio\:device0/in_accel_y_raw) + Z=$(cat /sys/bus/iio/devices/iio\:device0/in_accel_z_raw) + echo "X = ${X} Y = ${Y} Z= ${Z}" + .. note:: - It'll forget on reboot... need to have a boot service. + Adjust the device path ``iio:device0`` according to your setup. Also, ensure that your system + and hardware configuration are correctly set up to provide live accelerometer data through these paths. -.. todo:: +To make the script file executable, use the following command: - To make it stick, ... +.. code:: shell-session + debian@BeaglePlay:~$ chmod +x accelclick.sh -To use the add-on, see :ref:`beagleplay-mikrobus-using`. +When you run ``watch -n 0.5 ./accelclick.sh``, the watch command will execute ``./accelclick.sh`` every 0.5 seconds +and display its output in the terminal. +.. code:: shell-session -.. _beagleplay-mikrobus-using: + debian@BeaglePlay:~$ watch -n 0.5 ./accelclick.sh + +This is the output of your accelclick.sh script. It shows the current values of your accelerometer's X, Y, and Z axis in raw form. + +.. code:: shell-session + + Every 0.5s: ./accelclick.sh + + X = 3 Y = 11 Z= 284 + Using boards with Linux drivers ******************************* @@ -249,7 +417,7 @@ How does ClickID work? Disabling the mikroBUS driver ***************************** -If you'd like to use other means to control the mikroBUS connector, you might want to disable the mikroBUS driver. This is most easily done by enabling a deivce tree overlay at boot. +If you'd like to use other means to control the mikroBUS connector, you might want to disable the mikroBUS driver. This is most easily done by enabling a device tree overlay at boot. .. todo:: diff --git a/boards/beagleplay/demos-and-tutorials/using-qwiic.rst b/boards/beagleplay/demos-and-tutorials/using-qwiic.rst index 1d81dd758988769cad439e2a6b9ac827c80bb3e9..da7907df016caa408f98723cfbb2d1dd2e96a1f3 100644 --- a/boards/beagleplay/demos-and-tutorials/using-qwiic.rst +++ b/boards/beagleplay/demos-and-tutorials/using-qwiic.rst @@ -6,3 +6,264 @@ Using QWIIC See :ref:`qwiic_stemma_grove_addons`. A link to the appropriate I2C controller can be found at ``/dev/play/qwiic/i2c``. + +.. todo:: + + The above link may changed or outdated!! + +OLED Display using QWIIC +========================= + +Let's see a simple way to use an I2C QWIIC OLED from Sparkfun with only minor +modifications to the source code. (They will probably have this working by default in the future) + +The Sparkfun Qwiic OLED Display Library Comes in 3 Parts: + +- QWIIC_I2C_Py - We will need to modify this +- QWIIC-OLED-Base +- QWIIC-OLED-Display + +The reason we need to modify Qwiic_I2C_Py is that by default, the library expects only one +I2C Bus to be present for something like a Raspberry Pi, but our Beagle has many! +Specifically, we want to use I2C-5 which is the bus connected to the QWIIC header. + + +Wiring/Connection +=================== + +Make the connection as shown below. + +.. figure:: images/qwiic/beagleplay-qwiic-oled-connection.* + :width: 600 + :align: center + :alt: BeaglePlay QWIIC OLED Connection + + BeaglePlay QWIIC OLED Connection + +You can check what bus a device is connected to by scanning it. +First lets see what buses are available. + +.. code:: shell-session + + debian@BeaglePlay:~$ ls /dev/ | grep "i2c" + i2c-0 + i2c-1 + i2c-2 + i2c-3 + i2c-5 + +You can now scan each bus as follows: + +.. code:: shell-session + + i2cdetect -y -r 0 + +The ``0`` corresponds to ``i2c-0``. we can then replace ``0`` with each bus until we find the oled, +in this case, we know we are looking for a device at address ``0x3C``. + +.. code:: shell-session + + debian@BeaglePlay:~$ i2cdetect -y -r 0 + 0 1 2 3 4 5 6 7 8 9 a b c d e f + 00: -- -- -- -- -- -- -- -- + 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + 30: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + 50: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + 60: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- + 70: -- -- -- -- -- -- -- -- + +Note that when we see a ``UU``, this indicates that there is a device which is +currently being used by another linux process.This is most likely another I2C device that +the Beagle uses, such as the EEPROM. You can safely ignore this, but it's helpful to know +what you're looking at. + +Moving on, let's see Bus 5 (Hint, I2C-5 is the QWIIC connector): + +.. code:: shell-session + + debian@BeaglePlay:~$ i2cdetect -y -r 5 + 0 1 2 3 4 5 6 7 8 9 a b c d e f + 00: -- -- -- -- -- -- -- -- + 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + 30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- -- -- + 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + 70: -- -- -- -- -- -- -- -- + +Using Python libraries to display on OLED. +=========================================== + +let's install sparkfun Qwiic_I2C_Py Library. + +.. code:: shell-session + + git clone https://github.com/virtualRadish/Qwiic_I2C_Py_LC + +Change directory to ``Qwiic_I2C_Py_LC``. + +.. code:: shell-session + + cd Qwiic_I2C_Py_LC/ + +Install ``setup.py``. + +.. code:: shell-session + + sudo python setup.py install + +Install python libraries for OLED Displays. + +.. code:: shell-session + + sudo pip install sparkfun-qwiic-oled-base + sudo pip install sparkfun-qwiic-oled-display + +Let's create a file ``HelloWorld.py`` to display some text on display. + +.. code:: shell-session + + nano HelloWorld.py + +Now copy paste the text below, then press CTRL+O and ENTER to save, CTRL+X to exit. + +.. code:: python + + from __future__ import print_function + import qwiic_oled_display + import sys + import time + def runExample(): + # These three lines of code are all you need to initialize the + # OLED and print the splash screen. + # Before you can start using the OLED, call begin() to init + # all of the pins and configure the OLED. + print("\nSparkFun OLED Display - Hello World Example\n") + # Create instance with parameters for Qwiic OLED Display + myOLED = qwiic_oled_display.QwiicOledDisplay(0x3C) + if not myOLED.connected: + print("The Qwiic OLED Display isn't connected to the system. Please check your connection", \ + file=sys.stderr) + return + myOLED.begin() + + # clear(ALL) will clear out the OLED's graphic memory. + myOLED.clear(myOLED.ALL) # Clear the display's memory (gets rid of artifacts) + # To actually draw anything on the display, you must call the display() function. + myOLED.display() # Display buffer contents + time.sleep(1) + # clear(PAGE) will clear the SBC display buffer. + myOLED.clear(myOLED.PAGE) # Clear the display's buffer + # Display buffer contents + myOLED.display() + time.sleep(1) + # Print "Hello World" + # --------------------------------------------------------------------------- + # Add text + myOLED.print("Hello World!") + myOLED.set_cursor(0, 10) # Set cursor to top-left + myOLED.print("I'm BeaglePlay!") + # Display buffer contents + myOLED.display() + + if __name__ == '__main__': + try: + runExample() + except (KeyboardInterrupt, SystemExit) as exErr: + print("\nEnding OLED Hello Example") + sys.exit(0) + +Now run it. After executing following command, "Hello World!" in first line and "I'm BeaglePlay!" +in second line will be printed on OLED display. + +.. code:: shell-session + + python HelloWorld.py + +.. figure:: images/qwiic/beagleplay-qwiic-oled-helloworld.* + :width: 600 + :align: center + :alt: BeaglePlay QWIIC OLED HelloWorld.py Output + + BeaglePlay QWIIC OLED HelloWorld.py Output + +Now, lets display our current IP Address. + +Shout out out to `this <https://stackoverflow.com/questions/166506/finding-local-ip-addresses-using-pythons-stdlib>`_ StackOverflow one-liner which gets our IP Address cleanly so we can +display it as a string: + +.. code:: shell-session + + ipAddr = ((([ip for ip in socket.gethostbyname_ex(socket.gethostname())[2] if not ip.startswith("127.")] or [[(s.connect(("8.8.8.8", 53)), s.getsockname()[0], s.close()) for s in [socket.socket(socket.AF_INET, socket.SOCK_DGRAM)]][0] + [1]]) + ["no IP found"])[0]) + +Additionally in above text we can display our current IP Address using below script. +You can create a new file then copy paste it and run. + +.. code:: shell-session + + from __future__ import print_function + import qwiic_oled_display + import sys + import time + import socket + + def runExample(): + + IPAddr=(([ip for ip in socket.gethostbyname_ex(socket.gethostname())[2] if not ip.startswith("127.")] or [[(s.connect(("8.8.8.8", 53)), s.getsockname()[0], s.close()) for s in [socket.socket(socket.AF_INET, socket.SOCK_DGRAM)]][0][1]]) + ["no IP found"])[0] + + # These three lines of code are all you need to initialize the + # OLED and print the splash screen. + # Before you can start using the OLED, call begin() to init + # all of the pins and configure the OLED. + print("\nSparkFun OLED Display - Hello World Example\n") + # Create instance with parameters for Qwiic OLED Display + myOLED = qwiic_oled_display.QwiicOledDisplay(0x3C) + if not myOLED.connected: + print("The Qwiic OLED Display isn't connected to the system. Please check your connection", \ + file=sys.stderr) + return + myOLED.begin() + + # clear(ALL) will clear out the OLED's graphic memory. + myOLED.clear(myOLED.ALL) # Clear the display's memory (gets rid of artifacts) + # To actually draw anything on the display, you must call the display() function. + myOLED.display() # Display buffer contents + time.sleep(1) + # clear(PAGE) will clear the SBC display buffer. + myOLED.clear(myOLED.PAGE) # Clear the display's buffer + # Display buffer contents + myOLED.display() + time.sleep(1) + # Print "Hello World" + # --------------------------------------------------------------------------- + # Add text + myOLED.print("Hello World!") + myOLED.set_cursor(0, 10) # Set cursor to top-left + myOLED.print("I'm BeaglePlay!") + myOLED.set_cursor(0, 25) # Set cursor to top-left + myOLED.print("My IP Is:") + myOLED.print(IPAddr) + # Display buffer contents + myOLED.display() + + if __name__ == '__main__': + try: + runExample() + except (KeyboardInterrupt, SystemExit) as exErr: + print("\nEnding OLED Hello Example") + sys.exit(0) + +You will now see current IP Address as well on OLED display. + +.. figure:: images/qwiic/beagleplay-qwiic-oled-ipaddress.* + :width: 600 + :align: center + :alt: IP Address on QWIIC OLED Display + + + +Credits: `Andrei Aldea, Nishka Rao, Brian Berner <https://www.hackster.io/506688/beagleplay-qwiic-oled-hello-world-ee7270>`_ \ No newline at end of file diff --git a/boards/beagleplay/index.rst b/boards/beagleplay/index.rst index 05fc1f8fbc5c27864fd5fe06bccb0b60e543bd19..278e10fe1be529774b238b7f9bf6bb84ae158728 100644 --- a/boards/beagleplay/index.rst +++ b/boards/beagleplay/index.rst @@ -3,8 +3,6 @@ BeaglePlay ########## -:bdg-danger:`Work in progress` - BeaglePlay is an open-source single board computer based on the Texas Instruments AM6254 quad-core Cortex-A53 Arm SoC designed to simplify the process of adding sensors, actuators, indicators, human interfaces, and connectivity to a reliable embedded system. diff --git a/boards/beaglev/ahead/index.rst b/boards/beaglev/ahead/index.rst index 4a98a0d6cda4d1b420355f20fa34c85358ddb603..61c59c37375e1d89684849a751dc35e02f551b3f 100644 --- a/boards/beaglev/ahead/index.rst +++ b/boards/beaglev/ahead/index.rst @@ -3,8 +3,6 @@ BeagleV-Ahead ################### -:bdg-danger:`Work in progress` - BeagleV-Ahead is a high-performance open-source RISC-V single board computer (SBC) built around the Alibaba TH1520 SoC. It has the same P8 & P9 cape header pins as BeagleBone Black allowing you to stack your favourite BeagleBone cape on top to expand it's capability. Featuring a powerful quad-core RISC-V processor BeagleV Ahead is designed as an affordable diff --git a/boards/beaglev/fire/04-expansion.rst b/boards/beaglev/fire/04-expansion.rst index eed3e59cab65d4c5f597f0588ff31734e24d093a..1e8c1dd58f3f11234d8b84d5731375ba362758d1 100644 --- a/boards/beaglev/fire/04-expansion.rst +++ b/boards/beaglev/fire/04-expansion.rst @@ -3,8 +3,6 @@ Expansion ######### -:bdg-danger:`Work in progress` - Cape Headers ************* diff --git a/boards/beaglev/fire/demos-and-tutorials/gateware/axi-apb-interfaces-demo.rst b/boards/beaglev/fire/demos-and-tutorials/gateware/axi-apb-interfaces-demo.rst index e922d2b3efc630223555e6141e8ea6a4d8095298..928cb411f4dc4b6244cc1133ffb86c32b88091d6 100644 --- a/boards/beaglev/fire/demos-and-tutorials/gateware/axi-apb-interfaces-demo.rst +++ b/boards/beaglev/fire/demos-and-tutorials/gateware/axi-apb-interfaces-demo.rst @@ -114,29 +114,29 @@ Design Details Finally, an entry will be added to the device tree to make a UIO device point to our LSRAM's memory region. -.. code-block:: - - &{/} { - fabric-bus@40000000 { - fpgalsram: uio@60000000 { - compatible = "generic-uio"; - linux,uio-name = "fpga_lsram"; // mandatory for program. If changed, please update program as well. - reg = <0x0 0x60000000 0x0 0x1000>; - status = "enabled"; - }; - }; - }; +.. code-block:: devicetree + + &{/} { + fabric-bus@40000000 { + fpgalsram: uio@60000000 { + compatible = "generic-uio"; + linux,uio-name = "fpga_lsram"; // mandatory for program. If changed, please update program as well. + reg = <0x0 0x60000000 0x0 0x1000>; + status = "enabled"; + }; + }; + }; Once the gateware is compiled, we can access the memory-mapped interface by the same methods, and by the UIO device as well. 1. Using devmem2: - .. code-block:: shell +.. code-block:: shell - sudo devmem2 0x60000000 w # for read - sudo devmem2 0x60000000 w 0x1 # for write + sudo devmem2 0x60000000 w # for read + sudo devmem2 0x60000000 w 0x1 # for write -2. Using the UIO device: +1. Using the UIO device: .. raw:: html diff --git a/boards/beaglev/fire/demos-and-tutorials/gateware/exploring-gateware-design-libero.rst b/boards/beaglev/fire/demos-and-tutorials/gateware/exploring-gateware-design-libero.rst index e205cf41d2ab9b16f6151a8b3d60021b62f74037..4492cc130ce74f52f8f9918f2a800c62e153bb69 100644 --- a/boards/beaglev/fire/demos-and-tutorials/gateware/exploring-gateware-design-libero.rst +++ b/boards/beaglev/fire/demos-and-tutorials/gateware/exploring-gateware-design-libero.rst @@ -255,7 +255,8 @@ Exporting the Cape as a script which can be used in the gateware repository. I suggest creating an export directory where you can temporarily store the exported gateware files before getting them into the repository. -.. notice:: +.. note:: + You **must** make sure your path exist, because Libero does not currently tell you if the export is successfull or not. Now, simply copy it into the gateware at the following path. @@ -364,6 +365,7 @@ Go ahead and run the python script to build the gateware and verify your changes .. code-block:: shell scp -r ./bitstream beagle@<ip or name here>: + On the beagle, use: .. code-block:: shell diff --git a/boards/beaglev/fire/demos-and-tutorials/gateware/gateware-tcl-scripts-structure.rst b/boards/beaglev/fire/demos-and-tutorials/gateware/gateware-tcl-scripts-structure.rst index e858c6134e50fa3d4c9c03978562b0a0b8556ed2..7686672ecfa1175effea99eada07e7e84f77877c 100644 --- a/boards/beaglev/fire/demos-and-tutorials/gateware/gateware-tcl-scripts-structure.rst +++ b/boards/beaglev/fire/demos-and-tutorials/gateware/gateware-tcl-scripts-structure.rst @@ -93,5 +93,5 @@ following command in the gateware directory: python build-bitstream.py ./build-options/default.yaml # build option depending on the gateware You will need to have all microchip tools installed and the environment variables set up correctly. Refer -to the `microchip tools installation guide<mchp-fpga-tools-installation-guide>`_ for information on how to install these tools. +to the `microchip tools installation guide <beaglev-fire-mchp-fpga-tools-installation-guide>`_ for information on how to install these tools. diff --git a/boards/beaglev/fire/index.rst b/boards/beaglev/fire/index.rst index fc634c01af59ecb7fef468dd434050adb30fbd59..191cb00206ec84c0d8111fdc734eae5a0ab74ce4 100644 --- a/boards/beaglev/fire/index.rst +++ b/boards/beaglev/fire/index.rst @@ -3,8 +3,6 @@ BeagleV-Fire ################### -:bdg-danger:`Work in progress` - BeagleV®-Fire is a revolutionary SBC powered by the Microchip's PolarFire® MPFS025T RISC-V System on Chip (SoC) with FPGA fabric. BeagleV®-Fire opens up new horizons for developers, tinkerers, and the open-source community to explore the vast potential of RISC-V architecture and FPGA technology. It has the same P8 & P9 cape header pins as BeagleBone Black allowing you to stack your favorite BeagleBone diff --git a/boards/beagley/ai/02-quick-start.rst b/boards/beagley/ai/02-quick-start.rst index 50ab4d824cc214acf66957e0b61e51e495c5bdab..ae7e00d77c51f08ef07b12f69a8c7d9586efdd33 100644 --- a/boards/beagley/ai/02-quick-start.rst +++ b/boards/beagley/ai/02-quick-start.rst @@ -19,7 +19,7 @@ Getting started To get started your BeagleY-AI you need the following: 1. :ref:`5V @ 3A power supply <accessories-power-supplies>` -2. MicromicroSD card (32GB) +2. MicroSD card (32GB) 3. :ref:`beagley-ai-boot-media` You may need additional accessories based on the mode of operation, you can use your BeagleY-AI in different ways. @@ -85,9 +85,9 @@ Below are all the steps required to create a bootable microSD card with latest/r .. figure:: images/imager/step5-select-storage.* :align: center - :alt: Click on ``CHOOSE STORAGE`` buddon + :alt: Click on ``CHOOSE STORAGE`` button - Click on ``CHOOSE STORAGE`` buddon + Click on ``CHOOSE STORAGE`` button .. figure:: images/imager/step6-choose-microsd-card.* :align: center @@ -275,7 +275,7 @@ or command prompt (`Windows <https://www.wikihow.com/Open-the-Command-Prompt-in- ssh debian@192.168.7.2 -.. important:: Here ``debian`` is the default username, make sure to replace ``debian`` with the ``username`` you selected during :ref:`beagley-ai-boot-media` prepration step. +.. important:: Here ``debian`` is the default username, make sure to replace ``debian`` with the ``username`` you selected during :ref:`beagley-ai-boot-media` preparation step. .. tip:: If you are not able to find your beagle at ``192.168.7.2``, checkout :ref:`start-browse-to-beagle` to resolve your connection issue. @@ -293,7 +293,7 @@ UART connection ================ Your BeagleY-AI board creates a UART connection (No additional hardware required) when tethered to a Laptop/PC which you can access using ``Putty`` of ``tio``. -On a linux machine it may come up as ``dev/ttyACM*``, it will be different for Mac and Windows operatig systems. To find serial port for your system you can checkout +On a linux machine it may come up as ``dev/ttyACM*``, it will be different for Mac and Windows operating systems. To find serial port for your system you can checkout `this guide <https://www.mathworks.com/help/matlab/supportpkg/find-arduino-port-on-windows-mac-and-linux.html;jsessionid=c2d3127cd10411c66f33468cbd5b>`_. .. figure:: images/uart/putty.* @@ -336,7 +336,7 @@ Standalone connection .. important:: Make sure to update your ``username`` and ``password`` during - :ref:`beagley-ai-boot-media` prepration step else you'll not see any output on you HDMI monitor. + :ref:`beagley-ai-boot-media` preparation step else you'll not see any output on you HDMI monitor. To setup your BeagleY-AI for standalone usage, you need the following additional accessories, @@ -367,7 +367,7 @@ If everything is connected properly you should see four penguins on your monitor BeagleY-AI boot penguins -When prompted, login using the credentials you updated during :ref:`beagley-ai-boot-media` prepration step. +When prompted, login using the credentials you updated during :ref:`beagley-ai-boot-media` preparation step. .. Important:: You can not update login credentials at this step, you must update them during boot media (software image) micrSD card flashing or USB tethering step! diff --git a/boards/beagley/ai/03-design.rst b/boards/beagley/ai/03-design.rst index 1e6c7bbe3729fae6f34e50ae56e4a5cf5d5f6c6d..df25737ad65fa39f2c2da41217f665a46d1a1149 100644 --- a/boards/beagley/ai/03-design.rst +++ b/boards/beagley/ai/03-design.rst @@ -3,8 +3,6 @@ Design and Specifications ######################### -:bdg-danger:`Work in progress` - .. todo:: Add details about all the schematic sections. If you want to know how BeagleY-AI is designed and the detailed specifications, then diff --git a/boards/beagley/ai/demos/beagley-ai-arducam-imx219-v3link-dual-camera-kit.rst b/boards/beagley/ai/demos/beagley-ai-arducam-imx219-v3link-dual-camera-kit.rst index 9af40a96ffaf86d44c287e8fcb3248e2ff463de5..b0a7dd8e6f7abc9707fb1f18702e1689a5bc4a6b 100644 --- a/boards/beagley/ai/demos/beagley-ai-arducam-imx219-v3link-dual-camera-kit.rst +++ b/boards/beagley/ai/demos/beagley-ai-arducam-imx219-v3link-dual-camera-kit.rst @@ -3,8 +3,6 @@ Using the Arducam Dual V3Link Camera Kit ############################################ -:bdg-danger:`Work in progress` - .. todo:: Add further testing steps, results, and images. `The Arducam Dual V3Link Camera Kit <https://www.arducam.com/product/arducam-imx219-v3link-camera-kit-for-raspberry-pi/>`_ is an IMX219 based kit that leverages Texas Instruments' FPDLink technology to enable using two CSI cameras over a single port up to 15 meters away using twisted pair cables. diff --git a/boards/beagley/ai/demos/beagley-ai-expansion-nvme.rst b/boards/beagley/ai/demos/beagley-ai-expansion-nvme.rst index 5a0588a25f604a9ee1048c56523d6615899a318e..e0006726cc1a0b3e9d0899d79a148c420f932e21 100644 --- a/boards/beagley/ai/demos/beagley-ai-expansion-nvme.rst +++ b/boards/beagley/ai/demos/beagley-ai-expansion-nvme.rst @@ -3,8 +3,6 @@ Booting from NVMe Drives ########################## -:bdg-danger:`Work in progress` - .. todo:: Add further testing steps, results, and images. BeagleY-AI supports a PCI-Express x1 interface which enables data rates of up to 1GB/s for high speed expansion. diff --git a/boards/beagley/ai/demos/beagley-ai-pca9685-motor-drivers.rst b/boards/beagley/ai/demos/beagley-ai-pca9685-motor-drivers.rst index e3e235c6a7b2d466fd7d8dfc8fd4365a732083b0..1f91bcef2fccddb22ca6a1440ec3c8a4a9b20628 100644 --- a/boards/beagley/ai/demos/beagley-ai-pca9685-motor-drivers.rst +++ b/boards/beagley/ai/demos/beagley-ai-pca9685-motor-drivers.rst @@ -1,7 +1,5 @@ .. _beagley-ai-pca9685-motor-drivers: -:bdg-danger:`Work in progress` - .. todo:: Add further testing steps, results, and images. Using PCA9685 Motor Drivers diff --git a/boards/beagley/ai/demos/beagley-ai-using-gpio.rst b/boards/beagley/ai/demos/beagley-ai-using-gpio.rst index 2ad08e1cb1b573e8a36a68114008a76f3648f8f0..7328189e50e098736cbea8939942e20170348b8b 100644 --- a/boards/beagley/ai/demos/beagley-ai-using-gpio.rst +++ b/boards/beagley/ai/demos/beagley-ai-using-gpio.rst @@ -130,7 +130,7 @@ Let's create a script called **blinky.sh**, LED blinking -- You can exit the ``blinky.sh`` progrm by pressing ``CTRL + C`` on your keyboard. +- You can exit the ``blinky.sh`` program by pressing ``CTRL + C`` on your keyboard. Understanding the code ====================== @@ -161,6 +161,101 @@ Understanding the code <4> Wait 1 Second +Blink an LED using Python +************************* + +Using python you can blink an LED. + +The ``libgpiod`` should already be installed in the default image, in case it's not installed then +install it by using the command below. + +.. code:: console + + sudo apt-get install python3-libgpiod + +Below is the Python code to blink an LED connected to GPIO14. + +.. code-block:: console + :caption: blinky.py + + import gpiod + import time + + gpio14 = gpiod.find_line('GPIO14') + gpio14.request(consumer='beagle', type=gpiod.LINE_REQ_DIR_OUT, default_val=0) + + while True: + gpio14.set_value(1) + time.sleep(1) + gpio14.set_value(0) + time.sleep(1) + +To open the Python REPL, type ``python`` in the terminal like below. Copy the above code and paste it into the terminal. +After running the code, the LED connected to GPIO14 will start blinking. + +.. code:: console + + debian@BeagleBone:~$ python + Python 3.11.2 (main, May 2 2024, 11:59:08) [GCC 12.2.0] on linux + Type "help", "copyright", "credits" or "license" for more information. + >>> + +Alternatively, you can create a Python script to achieve the same effect. Create a new file named ``blinky.py`` and +open it using the ``nano`` editor with the following command, copy and paste the above code to the file. + +.. code:: console + + nano blinky.py + +Press ``CTRL+O`` & ``ENTER`` to save the ``blinky.py`` script and then ``CTRL+X`` to exit. + +To run the ``blinky.py`` script execute the command below, + +.. code:: console + + python blinky.py + +After running the code you can see the LED connected to ``GPIO14`` or ``HAT Pin 08`` blinking. + +Understanding the code +====================== + +.. callout:: + + .. code-block:: bash + + import gpiod <1> + import time <2> + + gpio14 = gpiod.find_line('GPIO14') <3> + gpio14.request(consumer='beagle', type=gpiod.LINE_REQ_DIR_OUT, default_val=0) <4> + + while True: <5> + gpio14.set_value(1) <6> + time.sleep(1) <7> + gpio14.set_value(0) <8> + time.sleep(1) <9> + + .. annotations:: + + <1> Importing ``gpiod`` module + + <2> Importing ``time`` module + + <3> Linking GPIO14 pin object to gpio14 variable for better accessibility + + <4> Set GPIO14 as OUTPUT pin + + <5> Create infinite ``while`` loop + + <6> Set the GPIO14 as 1 (HIGH) + + <7> Wait 1 Second + + <8> Set the GPIO14 as 0 (LOW) + + <9> Wait 1 Second + Read a Button ************** diff --git a/boards/beagley/ai/demos/beagley-ai-using-i2c-oled-display.rst b/boards/beagley/ai/demos/beagley-ai-using-i2c-oled-display.rst index 5134147b63994c43edef9a89d570edff8958d0f7..e2782f8c6d1793b81c7deb299d48d34a47505de5 100644 --- a/boards/beagley/ai/demos/beagley-ai-using-i2c-oled-display.rst +++ b/boards/beagley/ai/demos/beagley-ai-using-i2c-oled-display.rst @@ -19,19 +19,19 @@ Wiring/connection ================== Following the I2C pinout shown above let's make the connection of our OLED display with BeagleY-AI. -Connection for both ``128x64`` and ``128x32`` resolution displays are demostrated in the images below: +Connection for both ``128x64`` and ``128x32`` resolution displays are demonstrated in the images below: .. figure:: ../images/i2c/oled-128x32.* :align: center - :alt: OLED diaplay 128x32 + :alt: OLED display 128x32 - OLED diaplay 128x32 + OLED display 128x32 .. figure:: ../images/i2c/oled-128x64.* :align: center - :alt: OLED diaplay 128x64 + :alt: OLED display 128x64 - OLED diaplay 128x64 + OLED display 128x64 To check if your OLED is correctly connected to your BeagleY-AI you can use ``i2cdetect`` command as shown below. @@ -171,7 +171,7 @@ Clone the ``ssd1306_linux`` github repository on your BeagleY-AI. git clone https://github.com/armlabs/ssd1306_linux.git -Change directory to your clonned ``ssd1306_linux`` github repository. +Change directory to your cloned ``ssd1306_linux`` github repository. .. code:: console @@ -183,7 +183,7 @@ Execute ``make`` to build the binary to control your I2C OLED display. make -Now, you should have ``ssd1306_bin`` binary file genreated in the folder that you can use to easily +Now, you should have ``ssd1306_bin`` binary file generated in the folder that you can use to easily write text on you I2C OLED (ssd1306) display. Example1: Hello World!!!! diff --git a/boards/beagley/ai/demos/beagley-ai-using-imx219-csi-cameras.rst b/boards/beagley/ai/demos/beagley-ai-using-imx219-csi-cameras.rst index 38d16cb60efa6d3e0232c63e6e502850a7543639..62cfaa6b3798b8d6201abe748b0f1874fc88a6f0 100644 --- a/boards/beagley/ai/demos/beagley-ai-using-imx219-csi-cameras.rst +++ b/boards/beagley/ai/demos/beagley-ai-using-imx219-csi-cameras.rst @@ -3,8 +3,6 @@ Using IMX219 CSI Cameras ############################ -:bdg-danger:`Work in progress` - .. todo:: Add further testing steps, results, and images. Camera connection diff --git a/boards/beagley/ai/demos/beagley-ai-using-rtc.rst b/boards/beagley/ai/demos/beagley-ai-using-rtc.rst index ab1bd6200f0f119da1554479f9ee4373ade80843..18ad5346d6406bba6329b67a4abfa62425deda59 100644 --- a/boards/beagley/ai/demos/beagley-ai-using-rtc.rst +++ b/boards/beagley/ai/demos/beagley-ai-using-rtc.rst @@ -109,7 +109,7 @@ Let's create a simple script to get the two times, we'll call it ``getTime.sh``, nano getTime.sh -copy paste the below code in that file, +copy and paste the below code in that file, .. code:: shell diff --git a/boards/beagley/ai/index.rst b/boards/beagley/ai/index.rst index 50eb227140035f97e47004649f0281797502da43..a7a74dd8af988d399e2d9d27df3983606eb22d4a 100644 --- a/boards/beagley/ai/index.rst +++ b/boards/beagley/ai/index.rst @@ -3,8 +3,6 @@ BeagleY-AI ########## -:bdg-danger:`Work in progress` - BeagleY-AI is an open-source single board computer based on the Texas Instruments AM67A Arm-based vision processor. .. image:: images/beagley-ai-in-hand.* diff --git a/conf.py b/conf.py index 2f746d6821b510b29c8405f8b8078dcbd1f13263..339ec6cd158d0d52c2151137563a9702a737af8f 100644 --- a/conf.py +++ b/conf.py @@ -12,6 +12,14 @@ from pathlib import Path import pydata_sphinx_theme from sphinx.ext.imgconverter import ImagemagickConverter +# -- Banners -- +announcement_message = "Welcome to the new site for BeagleBoard.org docs!" +development_version_message = "This is a <strong>development version</strong> of docs." +forked_version_message = "This is a <strong>forked version</strong> of docs." +unknown_version_message = "This is an <strong>unknown version</strong> of docs." +version_link = "https://docs.beagleboard.org" +version_link_text = "Switch to released version" + # -- Project information -- project = 'BeagleBoard Docs' copyright = '2024, BeagleBoard.org Foundation' @@ -87,7 +95,6 @@ extensions = [ "sphinx.ext.todo", "sphinx.ext.autodoc", "sphinx.ext.autosummary", - "sphinx_tabs.tabs", "breathe", "sphinx_copybutton", "sphinxcontrib.youtube", @@ -132,6 +139,37 @@ numfig = True templates_path = ['_templates'] exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'env', ".venv"] +# parse pages details from 'PAGES' file +docs_url = "" +with open("PAGES") as f: + m = re.match( + ( + r"^PAGES_URL\s*=\s*(\S+)$\n" + + r"^PAGES_SLUG\s*=\s*(\S+)$\n" + + r"^GITLAB_USER\s*=\s*(\S+)$\n" + + r"^PROJECT_BRANCH\s*=\s*(\S+)$\n" + + r"^GITLAB_HOST\s*=\s*(\S+)$\n" + + r"^PROJECT_REPO\s*=\s*(\S+)$\n" + ), + f.read(), + re.MULTILINE, + ) + + if not m: + sys.stderr.write("Warning: Could not extract pages information\n") + else: + url, slug, user, branch, host, repo = m.groups(1) + slug = "latest" if slug == "main" else slug + pages_url = url + pages_slug = slug + gitlab_user = user + gitlab_version = branch + gitlab_url = host + gitlab_repo = repo + gitlab_project = "/".join((gitlab_url, gitlab_user, gitlab_repo)) + docs_url = "/".join((url, slug)) + +# HTML html_theme = 'pydata_sphinx_theme' html_static_path = ["_static"] html_logo = "_static/images/logo.svg" @@ -152,7 +190,6 @@ html_sidebars = { "index": [] } - html_theme_options = { "external_links": [ { @@ -211,8 +248,6 @@ html_theme_options = { "show_toc_level": 1, "navbar_align": "right", "show_nav_level": 1, - "announcement": "Welcome to new site for BeagleBoard.org docs!", - # "show_version_warning_banner": True, "navbar_center": ["navbar-nav"], "navbar_start": ["navbar-logo"], "navbar_end": ["theme-switcher", "navbar-icon-links"], @@ -222,36 +257,10 @@ html_theme_options = { "footer_end": ["last-updated"], # "content_footer_items": ["last-updated"], "secondary_sidebar_items": { - "**": ["page-toc", "edit-this-page", "sourcelink","pdf", "feedback", "forum", "license-terms", "message", "oshw"] + "**": ["todo", "page-toc", "edit-this-page", "sourcelink","pdf", "feedback", "forum", "license-terms", "message", "oshw"] }, } -# parse version from 'VERSION' file -with open("VERSION") as f: - m = re.match( - ( - r"^VERSION_MAJOR\s*=\s*(\d+)$\n" - + r"^VERSION_MINOR\s*=\s*(\d+)$\n" - + r"^PATCHLEVEL\s*=\s*(\d+)$\n" - + r"^VERSION_TWEAK\s*=\s*\d+$\n" - + r"^EXTRAVERSION\s*=\s*(.*)$" - ), - f.read(), - re.MULTILINE, - ) - - if not m: - sys.stderr.write("Warning: Could not extract docs version\n") - version = "Unknown" - else: - major, minor, patch, extra = m.groups(1) - version = ".".join((major, minor, patch)) - release_version = ".".join((major, minor)) - if extra: - version += "-" + extra - -release = version - # Variables here holds default settings pages_url = "https://docs.beagleboard.io" pages_slug = "" @@ -260,36 +269,6 @@ gitlab_version = "main" gitlab_url = "https://openbeagle.org" gitlab_repo = "docs.beagleboard.io" gitlab_project = "/".join((gitlab_url, gitlab_user, gitlab_repo)) -docs_url = "https://docs.beagleboard.io" - -# parse pages details from 'PAGES' file -with open("PAGES") as f: - m = re.match( - ( - r"^PAGES_URL\s*=\s*(\S+)$\n" - + r"^PAGES_SLUG\s*=\s*(\S+)$\n" - + r"^GITLAB_USER\s*=\s*(\S+)$\n" - + r"^PROJECT_BRANCH\s*=\s*(\S+)$\n" - + r"^GITLAB_HOST\s*=\s*(\S+)$\n" - + r"^PROJECT_REPO\s*=\s*(\S+)$\n" - ), - f.read(), - re.MULTILINE, - ) - - if not m: - sys.stderr.write("Warning: Could not extract pages information\n") - else: - url, slug, user, branch, host, repo = m.groups(1) - slug = "latest" if slug == "main" else slug - pages_url = url - pages_slug = slug - gitlab_user = user - gitlab_version = branch - gitlab_url = host - gitlab_repo = repo - gitlab_project = "/".join((gitlab_url, gitlab_user, gitlab_repo)) - docs_url = "/".join((url, slug)) html_context = { "display_gitlab": True, @@ -311,7 +290,13 @@ html_context = { "my_vcs_site": "https://openbeagle.org/docs/docs.beagleboard.io/-/edit/main/", "oshw_details": oshw_details, "pdf_paths": pdf_paths, - "board_details": board_details + "board_details": board_details, + "announcement_message": announcement_message, + "development_version_message": development_version_message, + "forked_version_message": forked_version_message, + "unknown_version_message": unknown_version_message, + "version_link": version_link, + "version_link_text": version_link_text, } # -- Options for LaTeX output -- diff --git a/intro/support/getting-started.rst b/intro/support/getting-started.rst index 1ec6258c418e499f152827750e7d83ccfa76404f..80edb8b1dad02a70a2df70b2af5a699e30ffcb30 100644 --- a/intro/support/getting-started.rst +++ b/intro/support/getting-started.rst @@ -80,8 +80,9 @@ If using an original BeagleBone or PocketBeagle, you are done. If using BeagleBone Black, BeagleBone Blue, BeagleBone AI, BeagleBone AI-64, BeaglePlay or other board with on-board eMMC flash and you desire to write the image to your on-board eMMC, you'll need to follow the instructions at http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#Flashing_eMMC. - When the flashing is complete, all 4 USRx LEDs will be steady off and possibly - power down the board upon completion. This can take up to 45 minutes. Power-down your board, remove the SD card and apply power again to finish. + During flash all 4 USRx LEDs will show sequential chaser pattern. When the flashing is complete, all 4 USRx LEDs will be + steady off and possibly power down the board upon completion. This can take up to 45 minutes. Power-down your board, + remove the SD card and apply power again to finish. Start your Beagle ***************** diff --git a/requirements.txt b/requirements.txt index fc7b2d5cd837574aefc7f8266322781cce7d6bc1..0f24296d2da78f0da0e67aa7bd3a0abf6882928a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -20,7 +20,7 @@ snowballstemmer==2.2.0 Sphinx==7.2.6 sphinx-autobuild==2021.3.14 sphinx-copybutton==0.5.2 -pydata-sphinx-theme==0.15.2 +pydata-sphinx-theme==0.15.4 sphinx-serve==1.0.1 sphinx-tabs==3.4.4 sphinx_design==0.5.0