diff --git a/books/beaglebone-cookbook/11misc/misc.rst b/books/beaglebone-cookbook/11misc/misc.rst index 89922a25f8933f47316e00b489aa1bf5071344da..2bb7775bcc06ff885004a472c2f64e2683a73753 100644 --- a/books/beaglebone-cookbook/11misc/misc.rst +++ b/books/beaglebone-cookbook/11misc/misc.rst @@ -346,7 +346,7 @@ some 6G bytes. bone$ pip install -U sphinx_design bone$ pip install -U sphinxcontrib-images bone$ pip install -U sphinx-serve - + These instructions came from `lorforlinux <https://beagleboard.slack.com/archives/C8S7EKZC2/p1684940872699269>`_ on the Beagleboard Slack channel. @@ -415,30 +415,36 @@ Here is a quick hack to get the Sparkfun Python examples to use bus 5. I'll show it for the Joystick, but it should work for the others as well. -Clone the Qwiic I2C repo: +First, browse to Sparkfun's qwiic Joystick page, +https://www.sparkfun.com/products/15168 and click on the +**DOCUMENTS** tab and then on **Python Package**. Follow the pip +instillation instructions (sudo pip install sparkfun-qwiic-joystick) -.. code-block:: bash +Next, uninstall the current qwiic |I2C| package. + +.. code-block:: shell-session + + bone$ sudo pip uninstall sparkfun-qwiic-i2c + +Then clone the Qwiic |I2C| repo: + +.. code-block:: shell-session bone$ git clone git@github.com:sparkfun/Qwiic_I2C_Py.git bone$ cd Qwiic_I2C_Py/qwiic_i2c Edit **linux_i2c.py** and go to around line 62 and change it to: -.. code-block:: bash +.. code-block:: shell-session iBus = 5 -Next, cd up a level to the Qwiic_I2C_Py directory and install +Next, cd up a level to the Qwiic_I2C_Py directory and reinstall .. code-block:: bash bone$ cd .. bone$ sudo python setup.py install -Next, browse to Sparkfun's qwiic Joystick page, -https://www.sparkfun.com/products/15168 and click on the -**DOCUMENTS** tab and then on **Python Package**. Follow the pip -instillation instructions (sudo pip install sparkfun-qwiic-joystick) - Finally, run one of the Joystick examples. If it isn't using bus 5, try reinstalling setup.py again. diff --git a/books/beaglebone-cookbook/11misc/tabs b/books/beaglebone-cookbook/11misc/tabs new file mode 100644 index 0000000000000000000000000000000000000000..7df12743533fbfb058f711d4146fca9bbab51e08 --- /dev/null +++ b/books/beaglebone-cookbook/11misc/tabs @@ -0,0 +1,31 @@ +.. tabs:: + + .. group-tab:: Commands + + .. code-block:: shell-session + + bone$ sudo apt update + bone$ sudo apt upgrade + bone$ sudo apt install -y \ + make git wget \ + doxygen graphviz librsvg2-bin\ + texlive-latex-base texlive-latex-extra latexmk texlive-fonts-recommended \ + python3 python3-pip \ + python3-sphinx python3-sphinx-rtd-theme python3-sphinxcontrib.svg2pdfconverter \ + python3-pil \ + imagemagick-6.q16 librsvg2-bin webp \ + texlive-full texlive-latex-extra texlive-fonts-extra \ + fonts-freefont-otf fonts-dejavu fonts-dejavu-extra fonts-freefont-ttf + bone$ python3 -m pip install --upgrade pip + bone$ pip install -U sphinx_design + bone$ pip install -U sphinxcontrib-images + bone$ pip install -U sphinx-serve + + .. group-tab:: Shell Output + + .. code-block:: shell-session + + bone$ git remote add upstream https://git.beagleboard.org/docs/docs.beagleboard.io.git + bone$ git fetch upstream + bone$ git pull upstream main + \ No newline at end of file