Skip to content

Seeed-Studio/grove-linux-driver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grove Linux Driver

Here is the Grove Linux Driver, currently it only support some grove devices on below platforms:



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/<kernel version>/ or it's sub-folder.

  1. Clone this repo

    cd
    git clone https://github.com/Seeed-Studio/grove-linux-driver.git
  2. Begin install

    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:

    uboot_overlay_addr<n>=/lib/firmware/<Device-Tree-Blob-Name>.dtbo
    

    <n>: is in 0..7 which not be used in the uEnv.txt.
    <Device-Tree-Blob-Name>: refer to Grove Device Table.

    example:

    # 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

    dtoverlay=<Device-Tree-Blob-Name>,<param0>=<value0>,<param1>=<value1>,...
    

    <Device-Tree-Blob-Name>,<paramN>, <valueN>: refer to specific usage in Grove Device Table

    example:

    # 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



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.

About

Grove linux driver for Grove-Base-Cape

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •