grovepi/Software/Python
2025-03-21 16:04:17 +01:00
..
firmware_tests first commit 2025-03-21 16:04:17 +01:00
grove_6axis_acc_compass first commit 2025-03-21 16:04:17 +01:00
grove_accelerometer_16g first commit 2025-03-21 16:04:17 +01:00
grove_barometer_sensors first commit 2025-03-21 16:04:17 +01:00
grove_chainable_rgb_led first commit 2025-03-21 16:04:17 +01:00
grove_co2_sensor first commit 2025-03-21 16:04:17 +01:00
grove_dht_pro_filter first commit 2025-03-21 16:04:17 +01:00
grove_earclipheartrate first commit 2025-03-21 16:04:17 +01:00
grove_fingerclip_heart_sensor first commit 2025-03-21 16:04:17 +01:00
grove_gesture_sensor first commit 2025-03-21 16:04:17 +01:00
grove_gps first commit 2025-03-21 16:04:17 +01:00
grove_hightemperature_sensor first commit 2025-03-21 16:04:17 +01:00
grove_i2c_adc first commit 2025-03-21 16:04:17 +01:00
grove_i2c_color_sensor first commit 2025-03-21 16:04:17 +01:00
grove_i2c_digital_light_sensor first commit 2025-03-21 16:04:17 +01:00
grove_i2c_motor_driver first commit 2025-03-21 16:04:17 +01:00
grove_i2c_multichannel_gas_sensor first commit 2025-03-21 16:04:17 +01:00
grove_i2c_oled_128_64 first commit 2025-03-21 16:04:17 +01:00
grove_i2c_sunlight_sensor first commit 2025-03-21 16:04:17 +01:00
grove_i2c_temp_hum_hdc1000 first commit 2025-03-21 16:04:17 +01:00
grove_i2c_temp_hum_sensor_mini first commit 2025-03-21 16:04:17 +01:00
grove_i2c_touch first commit 2025-03-21 16:04:17 +01:00
grove_ir_receiver first commit 2025-03-21 16:04:17 +01:00
grove_mini_motor_driver first commit 2025-03-21 16:04:17 +01:00
grove_oled first commit 2025-03-21 16:04:17 +01:00
grove_rflink433mhz_oneway_kit first commit 2025-03-21 16:04:17 +01:00
grove_rgb_lcd first commit 2025-03-21 16:04:17 +01:00
test_script first commit 2025-03-21 16:04:17 +01:00
grove_2_coil_latching_relay.py first commit 2025-03-21 16:04:17 +01:00
grove_4_digit_display.py first commit 2025-03-21 16:04:17 +01:00
grove_80cm_infrared_proximity_sensor.py first commit 2025-03-21 16:04:17 +01:00
grove_air_quality_sensor.py first commit 2025-03-21 16:04:17 +01:00
grove_analog_read.py first commit 2025-03-21 16:04:17 +01:00
grove_button.py first commit 2025-03-21 16:04:17 +01:00
grove_buzzer.py first commit 2025-03-21 16:04:17 +01:00
grove_collision_sensor.py first commit 2025-03-21 16:04:17 +01:00
grove_compass_example.py first commit 2025-03-21 16:04:17 +01:00
grove_compass_lib.py first commit 2025-03-21 16:04:17 +01:00
grove_dht_pro.py first commit 2025-03-21 16:04:17 +01:00
grove_dry_reed_relay.py first commit 2025-03-21 16:04:17 +01:00
grove_dust_sensor.py first commit 2025-03-21 16:04:17 +01:00
grove_electricity_sensor.py first commit 2025-03-21 16:04:17 +01:00
grove_electromagnet.py first commit 2025-03-21 16:04:17 +01:00
grove_encoder_read.py first commit 2025-03-21 16:04:17 +01:00
grove_firmware_version_check.py first commit 2025-03-21 16:04:17 +01:00
grove_flame_sensor.py first commit 2025-03-21 16:04:17 +01:00
grove_flow_read.py first commit 2025-03-21 16:04:17 +01:00
grove_gas_sensor.py first commit 2025-03-21 16:04:17 +01:00
grove_hcho_sensor.py first commit 2025-03-21 16:04:17 +01:00
grove_i2c_accelerometer.py first commit 2025-03-21 16:04:17 +01:00
grove_i2c_rtc.py first commit 2025-03-21 16:04:17 +01:00
grove_infrared_distance_interrupt.py first commit 2025-03-21 16:04:17 +01:00
grove_infrared_reflective_sensor.py first commit 2025-03-21 16:04:17 +01:00
grove_ir_receiver.py first commit 2025-03-21 16:04:17 +01:00
grove_led_blink.py first commit 2025-03-21 16:04:17 +01:00
grove_led_fade.py first commit 2025-03-21 16:04:17 +01:00
grove_ledbar.py first commit 2025-03-21 16:04:17 +01:00
grove_light_sensor.py first commit 2025-03-21 16:04:17 +01:00
grove_line_finder.py first commit 2025-03-21 16:04:17 +01:00
grove_loudness_sensor.py first commit 2025-03-21 16:04:17 +01:00
grove_magnetic_switch.py first commit 2025-03-21 16:04:17 +01:00
grove_moisture_sensor.py first commit 2025-03-21 16:04:17 +01:00
grove_mosfet.py first commit 2025-03-21 16:04:17 +01:00
grove_nfc_tag.py first commit 2025-03-21 16:04:17 +01:00
grove_ph_sensor.py first commit 2025-03-21 16:04:17 +01:00
grove_piezo_vibration_sensor.py first commit 2025-03-21 16:04:17 +01:00
grove_pir_motion_sensor.py first commit 2025-03-21 16:04:17 +01:00
grove_relay.py first commit 2025-03-21 16:04:17 +01:00
grove_rotary_angle_sensor.py first commit 2025-03-21 16:04:17 +01:00
grove_single_axis_analog_gyro.py first commit 2025-03-21 16:04:17 +01:00
grove_slide_potentiometer.py first commit 2025-03-21 16:04:17 +01:00
grove_solid_state_relay.py first commit 2025-03-21 16:04:17 +01:00
grove_sound_sensor.py first commit 2025-03-21 16:04:17 +01:00
grove_spdt_relay.py first commit 2025-03-21 16:04:17 +01:00
grove_switch.py first commit 2025-03-21 16:04:17 +01:00
grove_switch_relay.py first commit 2025-03-21 16:04:17 +01:00
grove_temperature_sensor.py first commit 2025-03-21 16:04:17 +01:00
grove_thumb_joystick.py first commit 2025-03-21 16:04:17 +01:00
grove_tilt_switch.py first commit 2025-03-21 16:04:17 +01:00
grove_touch_sensor.py first commit 2025-03-21 16:04:17 +01:00
grove_ultrasonic.py first commit 2025-03-21 16:04:17 +01:00
grove_vibration_motor.py first commit 2025-03-21 16:04:17 +01:00
grove_water_sensor.py first commit 2025-03-21 16:04:17 +01:00
grovepi.py first commit 2025-03-21 16:04:17 +01:00
GrovePi_Hardware_Test.py first commit 2025-03-21 16:04:17 +01:00
package_description.rst first commit 2025-03-21 16:04:17 +01:00
package_modules.txt first commit 2025-03-21 16:04:17 +01:00
README.md first commit 2025-03-21 16:04:17 +01:00
requirements.txt first commit 2025-03-21 16:04:17 +01:00
setup.cfg first commit 2025-03-21 16:04:17 +01:00
setup.py first commit 2025-03-21 16:04:17 +01:00
temp.py first commit 2025-03-21 16:04:17 +01:00

Installing the GrovePi for Python

This is how the GrovePi python library has to be installed:

curl -kL dexterindustries.com/update_grovepi | bash

You can also install it by running the setup.py installer, but beware of the other requirements for it too: specifically about the di_i2c module from https://github.com/DexterInd/RFR_Tools that has to be installed and the enabling of the I2C in raspi-config menu.

pip install -r requirements.txt
python3 setup.py install

You can also run python setup.py test to test import the modules of the GrovePi package that are listed in the package_modules.txt file. The python setup.py test commands should be run after pip installing the dependencies.

Library Breakdown

There are 2 kind of example scripts:

  1. Example programs that only require the grovepi module - these example scripts are found in this directory (or root directory of the Python package).

  2. Example programs that are based on other sublibraries other than the grovepi module - these example scripts are found in the subdirectories of this directory.

The libraries installed with the GrovePi package are listed in here.

Python Consideration

Even though you can install the GrovePi package for both versions of it (2.x and 3.x), some libraries other than the main one (grovepi.py) can only be used with Python3. Therefore, it's just better to use Python 3 by-default, instead of relying on an older version of Python which will anyway get retired in the very near future.