Grove Sensors
-
Dear All,
Is There some way to use the grove sensors (i.e https://www.seeedstudio.com/category/Sensor-for-Grove-c-24.html) with WiPy?
For example, RaspberryPi provides the GrovePi kit.Thanks in advance
-
@francesco-gallo
Grove have many sensors - ask about some specific then someone can hep you -
Hi Livius,
thanks a lot for your answer. In particular, I need support on Temperature sensors (http://wiki.seeed.cc/Grove-Temperature_Sensor_V1.2/), but in general my question regards all grove sensors.Thanks in advance
-
@francesco-gallo
I do not have this one but it look like simple analog sensor
use ADC for it - but remember about voltage levels 3V3 not 5V! -
-
@francesco-gallo
i do not tested this but you can try
from machine import ADC from math import log sensor_T = 4275 #T value sensor_R = 100000 # resistance adc = ADC(0) adc_c = adc.channel(pin='P13') while True: value = adc_c(); R = 1023.0/value-1.0 R = sensor_R*R temp = 1.0/(log(R/sensor_R)/sensor_T+1/298.15)-273.15; # convert to temperature print('temp: ', str(temp)) -
@francesco-gallo In addition to the hints given by @livius some notes:
a) you can and should run the Grive sensor at Vcc of 3.3V
b) change the linesadc = ADC(0) adc_c = adc.channel(pin='P13')to
adc = ADC(0, bits=10) adc_c = adc.channel(pin='P13', attn=adc.ATTN_11DB)" ``' to cope with the 3.3V range of the sensor and set it to 10 bit, which is assumed by the code. -
@robert-hh
good point -
@robert-hh Thanks a lot...I will try soon
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login