In my previous post, I explained how I have gotten interested in IOT devices lately. I recommend reading it before proceeding with this post as this is the first of a couple of posts that demonstrate how to put the IOT devices on a Raspberry Pi to good use. In this post specifically, I’ll show you how you can mount a Grove Base Hat onto a Raspberry Pi. The whole task should take you about 10 minutes in total.
Note: although I tested and run these sensors on a Raspberry Pi 3B+, they also work for the latest Raspberry Pi Model 4!
Mounting the Grove Base Hat
Mounting the Grove Base Hat is quick and easy. Here is what the package includes: 1 Grove Base Hat, 4 spacers, 8 screws.


You will need a cross-head screwdriver (size 0) for the screws.
The first task is to mount the spacers onto the Grove Base Hat. Just put 4 screws through the holes on each edge from the top down. Then use your fingers to screw on the spacers on each screw at the bottom of the Base Hat. Finally, use the screwdriver to tighten the screws while holding the spacers with your fingers.



Now that you have the spacers in place, you can place the Grove Base Hat onto the Raspberry Pi. The Base Hat fits perfectly onto the GPIO of the Raspberry Pi, you should have no issues putting the Base Hat straight on top of it. Make sure that you push down evenly on all four sides of the Base Hat to avoid damaging the Raspberry Pi GPIO or the Base Hat.





As the last step, you will have to screw the remaining 4 screws into the spacers from the bottom of the Raspberry Pi, tightening them gently with the screwdriver.

Congratulations, now you have your Grove Base Hat mounted on your Raspberry Pi. The next step is to install the grove.py software.

Installing the Seeed grove.py software
Once your Raspberry Pi is powered up and connected to the internet, you can now install the Seeed Studio provided grove.py software to make use of your Base Hat and attached devices. The installation is rather simple via one command:
curl -sL https://github.com/Seeed-Studio/grove.py/raw/master/install.sh | sudo bash -s -
This command will install quite a few additional packages and, depending on your Raspberry Pi and internet speed, may take several minutes to install.
pi@gvenzl-raspberrypi-1:~ $ curl -sL https://github.com/Seeed-Studio/grove.py/raw/master/install.sh | sudo bash -s - deb https://seeed-studio.github.io/pi_repo/ stretch main Warning: apt-key output should not be parsed (stdout is not a terminal) % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 3822 100 3822 0 0 9901 0 --:--:-- --:--:-- --:--:-- 9875 OK Get:1 http://archive.raspberrypi.org/debian buster InRelease [25.2 kB] Get:2 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB] Get:3 https://seeed-studio.github.io/pi_repo stretch InRelease [3,167 B] Get:4 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages [13.0 MB] Get:5 http://archive.raspberrypi.org/debian buster/main armhf Packages [260 kB] Get:6 https://seeed-studio.github.io/pi_repo stretch/main armhf Packages [31.0 kB] Fetched 13.3 MB in 12s (1,115 kB/s) Reading package lists... Done Building dependency tree Reading state information... Done 80 packages can be upgraded. Run 'apt list --upgradable' to see them. Enable I2C interface ... I2C interface enabled... Reading package lists... Done Building dependency tree Reading state information... Done python-rpi.gpio is already the newest version (0.7.0~buster-1). 0 upgraded, 0 newly installed, 0 to remove and 80 not upgraded. Reading package lists... Done Building dependency tree Reading state information... Done python3-rpi.gpio is already the newest version (0.7.0~buster-1). 0 upgraded, 0 newly installed, 0 to remove and 80 not upgraded. Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: libmraa1 0 upgraded, 1 newly installed, 0 to remove and 80 not upgraded. Need to get 65.7 kB of archives. After this operation, 191 kB of additional disk space will be used. Get:1 https://seeed-studio.github.io/pi_repo stretch/main armhf libmraa1 armhf 1.9.0-git20191021-pi20191021 [65.7 kB] Fetched 65.7 kB in 0s (377 kB/s) Selecting previously unselected package libmraa1. (Reading database ... 95844 files and directories currently installed.) Preparing to unpack .../libmraa1_1.9.0-git20191021-pi20191021_armhf.deb ... Unpacking libmraa1 (1.9.0-git20191021-pi20191021) ... Setting up libmraa1 (1.9.0-git20191021-pi20191021) ... Processing triggers for libc-bin (2.28-10+rpi1) ... Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: python-mraa 0 upgraded, 1 newly installed, 0 to remove and 80 not upgraded. Need to get 51.2 kB of archives. After this operation, 239 kB of additional disk space will be used. Get:1 https://seeed-studio.github.io/pi_repo stretch/main armhf python-mraa armhf 1.9.0-git20191021-pi20191021 [51.2 kB] Fetched 51.2 kB in 0s (337 kB/s) Selecting previously unselected package python-mraa. (Reading database ... 95850 files and directories currently installed.) Preparing to unpack .../python-mraa_1.9.0-git20191021-pi20191021_armhf.deb ... Unpacking python-mraa (1.9.0-git20191021-pi20191021) ... Setting up python-mraa (1.9.0-git20191021-pi20191021) ... Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libupm1 The following NEW packages will be installed: libupm1 python-upm 0 upgraded, 2 newly installed, 0 to remove and 80 not upgraded. Need to get 3,152 kB of archives. After this operation, 30.2 MB of additional disk space will be used. Get:1 https://seeed-studio.github.io/pi_repo stretch/main armhf libupm1 armhf 1.6.0-git20191021-pi20191021 [616 kB] Get:2 https://seeed-studio.github.io/pi_repo stretch/main armhf python-upm armhf 1.6.0-git20191021-pi20191021 [2,537 kB] Fetched 3,152 kB in 1s (3,111 kB/s) Selecting previously unselected package libupm1. (Reading database ... 95856 files and directories currently installed.) Preparing to unpack .../libupm1_1.6.0-git20191021-pi20191021_armhf.deb ... Unpacking libupm1 (1.6.0-git20191021-pi20191021) ... Selecting previously unselected package python-upm. Preparing to unpack .../python-upm_1.6.0-git20191021-pi20191021_armhf.deb ... Unpacking python-upm (1.6.0-git20191021-pi20191021) ... Setting up libupm1 (1.6.0-git20191021-pi20191021) ... Setting up python-upm (1.6.0-git20191021-pi20191021) ... Processing triggers for libc-bin (2.28-10+rpi1) ... Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libpython3.5 libpython3.5-minimal libpython3.5-stdlib The following NEW packages will be installed: libpython3.5 libpython3.5-minimal libpython3.5-stdlib python3-mraa 0 upgraded, 4 newly installed, 0 to remove and 80 not upgraded. Need to get 3,871 kB of archives. After this operation, 17.8 MB of additional disk space will be used. Get:1 https://seeed-studio.github.io/pi_repo stretch/main armhf python3-mraa armhf 1.9.0-git20191021-pi20191021 [43.9 kB] Get:2 http://mirrors.ocf.berkeley.edu/raspbian/raspbian buster/main armhf libpython3.5-minimal armhf 3.5.4-4 [572 kB] Get:3 http://mirrors.ocf.berkeley.edu/raspbian/raspbian buster/main armhf libpython3.5-stdlib armhf 3.5.4-4 [2,095 kB] Get:4 http://mirrors.ocf.berkeley.edu/raspbian/raspbian buster/main armhf libpython3.5 armhf 3.5.4-4 [1,160 kB] Fetched 3,871 kB in 3s (1,335 kB/s) Selecting previously unselected package libpython3.5-minimal:armhf. (Reading database ... 96911 files and directories currently installed.) Preparing to unpack .../libpython3.5-minimal_3.5.4-4_armhf.deb ... Unpacking libpython3.5-minimal:armhf (3.5.4-4) ... Selecting previously unselected package libpython3.5-stdlib:armhf. Preparing to unpack .../libpython3.5-stdlib_3.5.4-4_armhf.deb ... Unpacking libpython3.5-stdlib:armhf (3.5.4-4) ... Selecting previously unselected package libpython3.5:armhf. Preparing to unpack .../libpython3.5_3.5.4-4_armhf.deb ... Unpacking libpython3.5:armhf (3.5.4-4) ... Selecting previously unselected package python3-mraa. Preparing to unpack .../python3-mraa_1.9.0-git20191021-pi20191021_armhf.deb ... Unpacking python3-mraa (1.9.0-git20191021-pi20191021) ... Setting up libpython3.5-minimal:armhf (3.5.4-4) ... Setting up libpython3.5-stdlib:armhf (3.5.4-4) ... Setting up libpython3.5:armhf (3.5.4-4) ... Setting up python3-mraa (1.9.0-git20191021-pi20191021) ... Processing triggers for libc-bin (2.28-10+rpi1) ... Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: python3-upm 0 upgraded, 1 newly installed, 0 to remove and 80 not upgraded. Need to get 2,522 kB of archives. After this operation, 25.6 MB of additional disk space will be used. Get:1 https://seeed-studio.github.io/pi_repo stretch/main armhf python3-upm armhf 1.6.0-git20191021-pi20191021 [2,522 kB] Fetched 2,522 kB in 1s (3,693 kB/s) Selecting previously unselected package python3-upm. (Reading database ... 97730 files and directories currently installed.) Preparing to unpack .../python3-upm_1.6.0-git20191021-pi20191021_armhf.deb ... Unpacking python3-upm (1.6.0-git20191021-pi20191021) ... Setting up python3-upm (1.6.0-git20191021-pi20191021) ... Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: libbma456 0 upgraded, 1 newly installed, 0 to remove and 80 not upgraded. Need to get 45.7 kB of archives. After this operation, 0 B of additional disk space will be used. Get:1 https://seeed-studio.github.io/pi_repo stretch/main armhf libbma456 armhf 1.0.0-1 [45.7 kB] Fetched 45.7 kB in 0s (225 kB/s) Selecting previously unselected package libbma456. (Reading database ... 98167 files and directories currently installed.) Preparing to unpack .../libbma456_1.0.0-1_armhf.deb ... Unpacking libbma456 (1.0.0-1) ... Setting up libbma456 (1.0.0-1) ... Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: libbmi088 0 upgraded, 1 newly installed, 0 to remove and 80 not upgraded. Need to get 14.7 kB of archives. After this operation, 77.8 kB of additional disk space will be used. Get:1 https://seeed-studio.github.io/pi_repo stretch/main armhf libbmi088 armhf 0.0.2-1 [14.7 kB] Fetched 14.7 kB in 0s (115 kB/s) Selecting previously unselected package libbmi088. (Reading database ... 98168 files and directories currently installed.) Preparing to unpack .../libbmi088_0.0.2-1_armhf.deb ... Unpacking libbmi088 (0.0.2-1) ... Setting up libbmi088 (0.0.2-1) ... Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting rpi-ws281x Downloading https://files.pythonhosted.org/packages/94/ac/84e88cc07510858c37ae4907e3e61f025729935b44027ea4010d5b669c45/rpi_ws281x-4.2.2-cp27-cp27mu-linux_armv7l.whl (102kB) 100% |████████████████████████████████| 112kB 1.5MB/s Installing collected packages: rpi-ws281x Successfully installed rpi-ws281x-4.2.2 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting rpi-ws281x Downloading https://files.pythonhosted.org/packages/cb/64/15806dab1fa49f91a3983b6bc8c128ff247450232855b8ba175772865c98/rpi_ws281x-4.2.2-cp37-cp37m-linux_armv7l.whl (104kB) 100% |████████████████████████████████| 112kB 1.7MB/s Installing collected packages: rpi-ws281x Successfully installed rpi-ws281x-4.2.2 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting smbus Downloading https://files.pythonhosted.org/packages/ae/fb/a3e1657c85ca077a89fbdbe45540322768e078558131c6e299705bad9e76/smbus-1.1.post2-cp27-cp27mu-linux_armv7l.whl Installing collected packages: smbus Successfully installed smbus-1.1.post2 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting smbus Downloading https://www.piwheels.org/simple/smbus/smbus-1.1.post2-cp37-cp37m-linux_armv7l.whl (43kB) 100% |████████████████████████████████| 51kB 162kB/s Installing collected packages: smbus Successfully installed smbus-1.1.post2 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting smbus2 Downloading https://www.piwheels.org/simple/smbus2/smbus2-0.3.0-py2.py3-none-any.whl Installing collected packages: smbus2 Successfully installed smbus2-0.3.0 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting smbus2 Using cached https://www.piwheels.org/simple/smbus2/smbus2-0.3.0-py2.py3-none-any.whl Installing collected packages: smbus2 Successfully installed smbus2-0.3.0 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting bme680 Downloading https://files.pythonhosted.org/packages/83/55/81505dc68f66398c0c605cb24e9d331828a12596a8881f2b7968071e0c20/bme680-1.0.5-py2-none-any.whl Installing collected packages: bme680 Successfully installed bme680-1.0.5 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting bme680 Downloading https://files.pythonhosted.org/packages/0d/57/601aa55b6f23164a3e6a06c05f22f7e5283d09db9610fd4e49f0356f5a97/bme680-1.0.5-py3-none-any.whl Installing collected packages: bme680 Successfully installed bme680-1.0.5 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting rpi-vl53l0x Downloading https://files.pythonhosted.org/packages/31/e6/0f64f81f3c4d6a6a9c924340e33b40dd9b513faef0e164748bb114176678/rpi_vl53l0x-0.0.3.tar.gz (2.3MB) 100% |████████████████████████████████| 2.3MB 122kB/s Building wheels for collected packages: rpi-vl53l0x Running setup.py bdist_wheel for rpi-vl53l0x ... done Stored in directory: /root/.cache/pip/wheels/2a/d6/a9/836b685c18b8a21e9b768ea7ee1a17e0d34e5981283386ffe8 Successfully built rpi-vl53l0x Installing collected packages: rpi-vl53l0x Successfully installed rpi-vl53l0x-0.0.3 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting rpi-vl53l0x Downloading https://www.piwheels.org/simple/rpi-vl53l0x/rpi_vl53l0x-0.0.3-cp37-cp37m-linux_armv7l.whl (303kB) 100% |████████████████████████████████| 307kB 441kB/s Installing collected packages: rpi-vl53l0x Successfully installed rpi-vl53l0x-0.0.3 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting sgp30 Downloading https://files.pythonhosted.org/packages/7e/c3/a41fbb8db2ceda7ddbb58e664c4b10046f4618f0d43e8f8d4e910473bbcb/sgp30-0.1.6.tar.gz Requirement already satisfied: smbus2 in /usr/local/lib/python2.7/dist-packages (from sgp30) (0.3.0) Building wheels for collected packages: sgp30 Running setup.py bdist_wheel for sgp30 ... done Stored in directory: /root/.cache/pip/wheels/7f/60/2b/55d1ba15cabe77a19c5d37547a9781b2e6ab7e24c9d9146292 Successfully built sgp30 Installing collected packages: sgp30 Successfully installed sgp30-0.1.6 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting sgp30 Downloading https://www.piwheels.org/simple/sgp30/sgp30-0.1.6-py3-none-any.whl Requirement already satisfied: smbus2 in /usr/local/lib/python3.7/dist-packages (from sgp30) (0.3.0) Installing collected packages: sgp30 Successfully installed sgp30-0.1.6 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting https://github.com/Seeed-Studio/grove.py/archive/master.zip Downloading https://github.com/Seeed-Studio/grove.py/archive/master.zip / 2.0MB 25.5MB/s Requirement already satisfied, skipping upgrade: RPi.GPIO in /usr/lib/python2.7/dist-packages (from grove.py==0.6) (0.7.0) Requirement already satisfied, skipping upgrade: rpi_ws281x in /usr/local/lib/python2.7/dist-packages (from grove.py==0.6) (4.2.2) Requirement already satisfied, skipping upgrade: smbus2 in /usr/local/lib/python2.7/dist-packages (from grove.py==0.6) (0.3.0) Building wheels for collected packages: grove.py Running setup.py bdist_wheel for grove.py ... done Stored in directory: /tmp/pip-ephem-wheel-cache-OkEFaJ/wheels/1a/5b/70/01a949561c39a7059cd1daae9fa6d03e7b2c58d7ec4fb6245f Successfully built grove.py Installing collected packages: grove.py Successfully installed grove.py-0.6 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting https://github.com/Seeed-Studio/grove.py/archive/master.zip Downloading https://github.com/Seeed-Studio/grove.py/archive/master.zip / 163kB 2.6MB/s Requirement already satisfied, skipping upgrade: RPi.GPIO in /usr/lib/python3/dist-packages (from grove.py==0.6) (0.7.0) Requirement already satisfied, skipping upgrade: rpi_ws281x in /usr/local/lib/python3.7/dist-packages (from grove.py==0.6) (4.2.2) Requirement already satisfied, skipping upgrade: smbus2 in /usr/local/lib/python3.7/dist-packages (from grove.py==0.6) (0.3.0) Building wheels for collected packages: grove.py Running setup.py bdist_wheel for grove.py ... done Stored in directory: /tmp/pip-ephem-wheel-cache-7hbbzp8z/wheels/1a/5b/70/01a949561c39a7059cd1daae9fa6d03e7b2c58d7ec4fb6245f Successfully built grove.py Installing collected packages: grove.py Successfully installed grove.py-0.6 ####################################################### Lastest Grove.py from github install complete !!!!! ####################################################### pi@gvenzl-raspberrypi-1:~ $
Once you see Lastest Grove.py from github install complete !!!!! you have successfully installed the latest version of the software. If you type in your terminal grove_
and hit the Tab
key, you will see various Grove modules that you can use with your IOT devices:
pi@gvenzl-raspberrypi-1:~ $ grove_ grove_12_key_cap_i2c_touch_mpr121 grove_i2c_thermocouple_amplifier_mcp9600 grove_round_force_sensor grove_16x2_lcd grove_imu_9dof_icm20600_ak09918 grove_ryb_led_button grove_1wire_thermocouple_amplifier_max31850 grove_lcd_1.2inches grove_servo grove_3_axis_accelerometer_adxl372 grove_led grove_slide_potentiometer grove_3_axis_compass_bmm150 grove_light_sensor_v1_2 grove_sound_sensor grove_3_axis_digital_accelerometer grove_loudness_sensor grove_step_counter_bma456 grove_4_digit_display grove_mech_keycap grove_switch grove_6_axis_accel_gyro_bmi088 grove_mini_pir_motion_sensor grove_temperature_humidity_bme680 grove_air_quality_sensor_v1_3 grove_moisture_sensor grove_temperature_humidity_sht31 grove_button grove_multi_switch grove_temperature_sensor grove_cap_touch_slider_cy8c grove_multi_switch_poll grove_thumb_joystick grove_collision_sensor grove_oled_display_128x64 grove_tilt_switch grove_current_sensor grove_optical_rotary_encoder grove_time_of_flight_distance grove_gesture_sensor grove_piezo_vibration_sensor grove_touch_sensor grove_gpio grove_pwm_buzzer grove_ultrasonic_ranger grove_high_accuracy_temperature grove_recorder_v3_0 grove_uv_sensor grove_i2c_color_sensor_v2 grove_relay grove_water_sensor grove_i2c_motor_driver grove_rotary_angle_sensor grove_ws2813_rgb_led_strip
If you want to get your own Grove Base Hat for Raspberry Pi you can buy it here from Seeed Studio.
2 thoughts on “How to mount a Grove Base Hat for Raspberry Pi”