Datasheet

11
6.3 With Raspberry Pi
1. You should have got a raspberry pi and a grovepi or grovepi+.
2. You should have completed configuring the development environment, otherwise follow here.
3. Connection. Plug the sensor to grovepi socket D5 by using a grove cable.
4. Navigate to the demos' directory:
cd yourpath/GrovePi/Software/Python/
To see the code
nano grove_4_digit_display.py # "Ctrl+x" to exit #
import time
import grovepi
# Connect the Grove 4 Digit Display to digital port D5
# CLK,DIO,VCC,GND
display = 5
grovepi.pinMode(display,"OUTPUT")
# If you have an analog sensor connect it to A0 so you can monitor it
below
sensor = 0
grovepi.pinMode(sensor,"INPUT")