You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Adafruit_BBIO/README.md
+21-2Lines changed: 21 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ This module enables access to the Beaglebone Black enhanced Quadrature Encoder P
4
4
5
5
## Usage
6
6
7
-
On a recent Beaglebone Debian image, access to the eQEP0 and eQEP2 channels should work out of the box:
7
+
On a recent Beaglebone Debian image, access to the eQEP0 and eQEP2 channels should work out of the box, at least as root user. To ensure you can run the code as a regular user, read on the prerequisites section below.
8
8
9
9
```python
10
10
from Adafruit_BBIO.Encoder import RotaryEncoder, eQEP2
@@ -64,6 +64,8 @@ If you need to use further channels, read on the prerequisites in the following
In order to be able to run code that accesses the eQEP modules as a regular user, as opposed to root, that user must be part of the `eqep` group.
85
+
86
+
To check which users are part of the `eqep` group:
87
+
88
+
```
89
+
cat /etc/group | grep eqep
90
+
```
91
+
92
+
To add user `userName` to the `eqep` group (run this command as root):
93
+
```
94
+
usermod -a -G eqep userName
95
+
```
96
+
97
+
### Capes
98
+
80
99
In order to use all eQEP pins the BeagleBone must boot with the [cape-universal](https://github.com/beagleboard/bb.org-overlays/tree/master/tools/beaglebone-universal-io) enabled, and load the `cape-universal` overlay.
81
100
82
101
This is the default, thus **no further steps are initially required to use eQEP0 and eQEP2**. Simply double-check that the following line is present and not commented out on your `/boot/uEnv.txt` file:
@@ -87,7 +106,7 @@ enable_uboot_cape_universal=1
87
106
88
107
Note: Some older documentation recommends using the `cmdline` and `cape_enable` options instead. They are meant to load deprecated kernel-based overlays and it's not recommended to use them. Use the new way of [loading overlays via uboot](https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays) instead, as instructed above.
89
108
90
-
### Enabling additional eQEP modules
109
+
####Enabling additional eQEP modules
91
110
92
111
The `cape-universal` overlay will enable access to the eQEP0 and eQEP2 modules. As it does not expose pins that are shared with the HDMI interface, eQEP1 and eQEP2b will **not** be available.
0 commit comments