From fc55b07d6618be23f8a9e4d6faa7b0e9480ed422 Mon Sep 17 00:00:00 2001 From: Kai Yamada <gpioblink@gmail.com> Date: Thu, 11 Aug 2022 01:36:24 +0900 Subject: [PATCH] add relay introduction --- capes/overlays/basics.rst | 25 ++++++++++++++++ capes/overlays/index.rst | 12 ++++++++ capes/overlays/relay.rst | 61 +++++++++++++++++++++++++++++++++++++++ index.rst | 4 +++ 4 files changed, 102 insertions(+) create mode 100644 capes/overlays/basics.rst create mode 100644 capes/overlays/index.rst create mode 100644 capes/overlays/relay.rst diff --git a/capes/overlays/basics.rst b/capes/overlays/basics.rst new file mode 100644 index 00000000..a9ae5d04 --- /dev/null +++ b/capes/overlays/basics.rst @@ -0,0 +1,25 @@ +.. _bone-cape-basics: + +Basics +####### + +BeagleBone has sold a module called Cape, which connects to the BeagleBoard and the PocketBeagle. + +Using Cape, you can easily add sensors, communication peripherals, etc. with ease. + +Please see below for Cape available to date. + +`BeagleBoard.org - Cape <https://beagleboard.org/capes>`_ + +Features +============= + +For example, BeagleBoard has various variants such as Black, Green, and AI. +The device tree overlay feature allows BeagleBone capes +to be identical across these different pieces of hardware. + +Each hardware has different internal pin assignments +and the number of peripherals in the SoC, but the device tree overlay absorbs these differences. + +The user of Cape are essentially able to use it +across the corresponding Boards without changing any code at all. \ No newline at end of file diff --git a/capes/overlays/index.rst b/capes/overlays/index.rst new file mode 100644 index 00000000..9b01043a --- /dev/null +++ b/capes/overlays/index.rst @@ -0,0 +1,12 @@ +.. _beagleboard-cape: + +Capes Overlays +############### + +.. note:: This section is under developmement right now. + +.. toctree:: + :maxdepth: 1 + + basics.rst + relay.rst diff --git a/capes/overlays/relay.rst b/capes/overlays/relay.rst new file mode 100644 index 00000000..7f133a44 --- /dev/null +++ b/capes/overlays/relay.rst @@ -0,0 +1,61 @@ +.. _bone-cape-relay: + +BeagleBoard.org BeagleBone Relay Cape +######### + +Relay Cape, as the name suggests, is a simple Cape with a relay on it. +It contains four relays, each of which can be operated independently from the BeagleBone. + +`Schematic <https://github.com/beagleboard/capes/tree/master/beaglebone/Relay>`_ + +.. note:: + The following describes how to use the device tree overlay under development. + The description may not be suitable for those using older firmware. + +How to Use +--------------- + +Installation +****** + +No special configuration is required. When you plug Cape into your BeagleBoard, +it is automatically recognized by the Cape Universal function. + +You can check to see if Relay Cape is recognized with the following command. + +.. code-block:: + + ls /proc/device-tree/chosen/overlay + +A list of currently loaded device tree overlays is displayed here. +If you see `BBORG_RELAY-00A2.kernel` in this list, it has been loaded correctly. + +If it is not loaded correctly, you can also load it directly +by adding the following to the U-Boot options +(which can be reflected by changing /boot/uEnv.txt). + +.. code-block:: + + uboot_overlay_addr0=/boot/dtbs/X.XX.XXX-ti-rXX/overlays/BBORG_RELAY-00A2.dtbo + +Enter the kernel version specified by uname in the `X.XX.XXX-ti-rXX` part. + +Usage +****** + +.. code-block:: + + ls /sys/class/leds + +The directory "relay*" exists in the following directory. +The LEDs can be controlled by modifying the files in this directory. + +.. code-block:: + + echo 1 > relay1/brightness + +This allows you to adjust the brightness; +entering 1 for brightness turns it ON, and entering 0 for OFF. + +The four relays can be changed individually +by changing the number after "relay. \ No newline at end of file diff --git a/index.rst b/index.rst index 9b7f6f0b..112da649 100644 --- a/index.rst +++ b/index.rst @@ -34,7 +34,11 @@ Sections :caption: Projects simppru/index.rst +.. toctree:: + :maxdepth: 1 + :caption: Capes + cape/overlays/index.rst .. toctree:: :maxdepth: 1 :caption: Books -- GitLab