https://github.com/seeed-studio/grove-linux-driver
Grove linux driver for Grove-Base-Cape
https://github.com/seeed-studio/grove-linux-driver
grove grove-base-cape linux-driver
Last synced: 7 months ago
JSON representation
Grove linux driver for Grove-Base-Cape
- Host: GitHub
- URL: https://github.com/seeed-studio/grove-linux-driver
- Owner: Seeed-Studio
- License: mit
- Created: 2019-01-03T07:03:27.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2025-01-08T08:53:19.000Z (about 1 year ago)
- Last Synced: 2025-04-06T01:06:01.556Z (10 months ago)
- Topics: grove, grove-base-cape, linux-driver
- Language: C
- Homepage: https://www.seeedstudio.com
- Size: 214 KB
- Stars: 9
- Watchers: 12
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Grove Linux Driver
==================
Here is the Grove Linux Driver, currently it only support some grove devices on below platforms:
- [PocketBeagle](https://beagleboard.org/pocket) with Pocket Beagle Grove Cape
- [BeagleBone Green](https://www.seeedstudio.com/Grove-Cape-for-BeagleBone-Series-p-1718.html)
- [BeagleBone Green Wireless](https://www.seeedstudio.com/BeagleBone-Green-Wireless-Development-Board-TI-AM335x-WiFi-B-p-2650.html)
- SeeedStudio BeagleBone Green Gateway Baseboard
- [Raspberry Pi](https://www.seeedstudio.com/category/Boards-c-17.html)
Installation
------------
Below steps will prepare all grove device tree blob object(.dtbo) to
```/lib/firmware/``` on BB Series or ```/boot/overlays/``` on RPi,
and grove device kernel module(.ko) to ```/lib/modules//``` or it's sub-folder.
1. Clone this repo
```bash
cd
git clone https://github.com/Seeed-Studio/grove-linux-driver.git
```
2. Begin install
```bash
cd ~/grove-linux-driver
sudo ./install.sh
```
Usage
-----
After installation, the driver is prepared well, then we need to enable specific
grove device in system configuration file.
#### BB Series
* Append below line to the configuration file
[/boot/uEnv.txt](https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays):
```bash
uboot_overlay_addr=/lib/firmware/.dtbo
```
``````: is in 0..7 which not be used in the uEnv.txt.
``````: refer to [Grove Device Table](#grove-device-table).
***example:***
```bash
# If you plugin Grove LED to slot 1057 of Pocket Beagle Grove Cape,
# and uboot_overlay_addr0 is unused, append the line:
uboot_overlay_addr0=/lib/firmware/BB-GPIO-GROVE-LED.dtbo
```
#### RPi Series
* Append below line to the configuration file
[/boot/config.txt](https://github.com/raspberrypi/linux/blob/rpi-4.14.y/arch/arm/boot/dts/overlays/README)
```bash
dtoverlay=,=,=,...
```
``````,``````, ``````:
refer to specific usage in [Grove Device Table](#grove-device-table)
***example:***
```bash
# If you connect Grove Button to gpio 5 of Raspberry Pi, append the line:
dtoverlay=gpio-key,gpio=5
# The default keycode is KEY_POWER, so the pressing will result in a power off.
```
#### User interface
* refer to ```Specific Usage``` of [Grove Device Table](#grove-device-table).
Grove Device Table
------------------
Grove Devices
Device Tree Blob
Device Driver
Specific Usage
Red LED
Green LED
Purple LED
White LED
BB : BB-GPIO-GROVE-LED
RPi: grove-led
inner drivers/leds/leds-gpio.c
Click
Button
BB : BB-GPIO-GROVE-BUTTON
RPi: gpio-key
inner drivers/input/keyboard/gpio_keys.c
Click
Ultrasonic Ranger
BB-GPIO-HCSR04
src/hcsr04/hcsr04.c
Click
Temp&Humi&Barometer Sensor (BME280)
BB-I2C1-BME280
inner drivers/iio/pressure/bmp280-i2c.c
Click
16 x 2 LCD (Black on Red)
16 x 2 LCD (Black on Yellow)
16 x 2 LCD (White on Blue)
BB-I2C1-JHD1802
src/hd44780/hd44780-i2c.c
Click
3-Axis Digital Accelerometer (±16g)
BB-I2C2-ADXL34X
src/adxl34x/adxl34x-i2c.c
Click
3-Axis Digital Accelerometer (±400g)
BB-I2C2-LIS331DLH
inner drivers/iio/accel/st_accel_i2c.c
Click
Temperature & Humidity Sensor (SHT31)
BB-I2C2-SHT3X
src/sht3x/sht3x.c
Click
Time of Flight Distance Sensor (VL53L0X)
BB-I2C2-VL53L0X
src/vl53l0x/vl53l0x.c
Click
Triple Color E-Ink Display 1.54"
Triple Color E-Ink Display 2.13"
BB-UART4-E-INK
src/e-ink/eink-tty.c
Chainable RGB LED
Chainable RGB Led V2.0
BB-GPIO-P9813
src/p9813/p9813.c
Click
**Note:**
```inner``` means the device driver integreted into linux kernel image,
no need driver source code in this repo.