Getting started with my first project
-
Hi,
My first project is a water sensor on a SipyThe sensor that I have doesn't have a serial number, so how would I include it into the main.py code?
import machine
from machine import ADC
adc = ADC()
apin = adc.channel(pin='P1')
apin()I need the sensor to activate a relay, for that it should be a simple output
pin = machine.Pin(15, machine.Pin.OUT)
please comment and let me know where i am making mistakes or where i should improve
-
Can you explain a little more about this sensor? What interface does it have, is it just an analog voltage that maps to a water level? Is it just an on/off float switch?
-
@seb it is a water moisture sensor that reads a voltage between 2 probes.
below is the link to the site I purchased the sensor from
https://www.robotics.org.za/SOIL-KIT-PRO?search=Soil Sensor Kit - Pro -
Are you using the analog output or the digital one? Also what voltage are you powering the sensor from?
-
@seb I have not attached it yet, was doing the homework on what will work best.
Will try it on the 3.3V, might go with a digital reading as all I am looking for is a true/ false statement to activate the relay
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