With Raspberry Pi - SeeedStudio Grove TA12-200 Manual

Electricity sensor
Table of Contents

Advertisement

5.2

With Raspberry Pi

1. You should have got a raspberry pi and a grovepi or grovepi+.
2. You should have completed configuring the development enviroment, otherwise follow
3. Connection
Plug the sensor to grovepi socket A0 by using a grove cable.
4. Navigate to the demos' directory:
cd yourpath/GrovePi/Software/Python/
To see the code
nano grove_electricity_sensor.py
import time
import grovepi
# Connect the Grove Electricity Sensor to analog port A0
# SIG,NC,NC,GND
sensor = 0
grovepi.pinMode(sensor,"INPUT")
# Vcc of the grove interface is normally 5v
grove_vcc = 5
while True:
try:
# Get sensor value
sensor_value = grovepi.analogRead(sensor)
# "Ctrl+x" to exit #
8
here
.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Grove TA12-200 and is the answer not in the manual?

Table of Contents