Page 1
12-bit 8 channel ADC is also available for Raspberry Pi. Frankly speaking, it's about 60 Grove modules support the Grove Base Hat for Raspberry Pi now. However, we will continue to add new compatible modules, the more you use, the more grove added.
Specification Item Value Operating Voltage 3.3V STM32 12-bit 8 channel Grove Port 6 Digital 4 Analog 3 I2C 1 PWM 1UART Raspberry pi communication bus I2C Address 0x04 Attention The operating voltage is 3.3V, please do not input more than 3.3V, otherwise it may damage the Raspberry Pi. Moreover, this hat can not work with 5V grove module via grove port, please use 3.3V compatible Grove module.
Page 3
GPIO The same pin out as the raspberry pi. PWM(pulse-width modulation) The Grove PWM Port connect to GPIO/BCM pin12(PWM0) and GPIO/BCM pin13(PWM1), which is the hardware PWM pin of Raspberry Pi, in addition, you can use all the GPIO pin as the soft PWM pin. Note 0- All the silkscreen layer pin number besides the Grove port is the BCM pin number.
Page 4
UART The Grove UART port connect to the GPIO14(UART0 TX) and GPIO15(UART0 RX). UART is commonly used on the Pi as a convenient way to control it over the GPIO, or access the kernel boot messages from the serial console (enabled by default).It can also be used as a way to interface an Arduino, bootloaded ATmega, ESP8266, etc with your Pi.
Page 5
As we know, there is no ADC in the Raspberry Pi, so it can not work with analog sensor directly. Now with the help of the build-in MCU STM32, the Grove base hat can work as an external 12-bit ADC, which means you can use analog sensor with your Raspberry Pi. Even more pleasing is that not one but four analog Grove sockets are available.
Raspberry Pi may crash. Software In this section we will introduce how to install the seeed grove.py library and how to use I2C, PWM, Digital and analog port of the Grove Base Hat for Raspberry Pi. If you do not know how to use a raspberry pi, please check here before start.
Installation Online one-click installation One-click installation, quick start, what ever you call, with the single command below, we can install/update all dependencies and latest grove.py. 1 curl -sL https://github.com/Seeed-Studio/grove.py/raw/master/install.sh | sudo bash -s - Success if everything goes well, you will see the following notice.
Page 8
Usage Now you can use the Grove Base Hat for Raspberry Pi with dozens Grove modules, tap the command grove_ and press the key to check the supported Grove list. pi@raspberrypi:~$ grove_ grove_3_axis_compass_bmm150 grove_i2c_color_sensor_v2 grove_mini_pir_motion_sensor grove_rotary_angle_sensor grove_temperature_sensor grove_4_digit_display grove_i2c_motor_driver...
Page 9
sudo grove_pwm_buzzer Tap the following command in the command line interface. pi@raspberrypi:~$ sudo grove_pwm_buzzer Insert Grove-Buzzer to Grove-Base-Hat slot PWM[12 13 VCC GND] 3800 3400 3000 2900 2550 2270 2000 exiting application The buzzer will ring a few times and then stop, the program will automatically exit. Digital Port We will take the Grove - Ultrasonic Ranger...
Page 10
17.429220265355603 18.73230112010035 20.717752390894397 19.83807004731277 17.3059003106479 ^CTraceback (most recent call last): File "/usr/local/bin/grove_ultrasonic_ranger", line 11, in <module> load_entry_point('grove.py==0.5', 'console_scripts', 'grove_ultrasonic_ranger')() File "/usr/local/lib/python3.5/dist- packages/grove/grove_ultrasonic_ranger.py", line 107, in main time.sleep(1) KeyboardInterrupt When you change the distance between the Grove - Ultrasonic Ranger and the target object, the measurment value will change accordingly. Ctrl Press to quit.
Page 11
pi@raspberrypi:~$ grove_air_quality_sensor_v1_3 Detecting ... 62, Air Quality OK. 63, Air Quality OK. 61, Air Quality OK. 61, Air Quality OK. 59, Air Quality OK. 62, Air Quality OK. 60, Air Quality OK. 60, Air Quality OK. 59, Air Quality OK. 60, Air Quality OK.
If you use the I2C tool to scan the I2C address of the grove module, you may find two or more address. 0x04 is the adrress of the Grove Base Hat for Raspberry Pi. Resources [Zip] Grove Base Hat for Raspberry Pi Eagle Files [Zip] Seeed Grove.py Library ...
Need help?
Do you have a question about the Grove Base Hat and is the answer not in the manual?
Questions and answers