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
-
@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
-
Are you using the analog output or the digital one? Also what voltage are you powering the sensor from?
-
@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
-
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?