M5Stack with a moisture sensore, Arduino IDE



  • Hello,
    I need to work with the module M5stack core kit V1.0 . I try to connect a moisture Funduino sensor to this module with a Arduino IDE but i cann't do it...
    Before i have try with the sensor DHT11 and i can receive the temperature, but with the moisture sensor i don't find anything. I connected:

    • to the GND
    • to 3,3 V
      S to GPIO22

    ![0_1556289977868_Unbenannt.PNG](Uploading 100%)

    The sensor use a analogic output, you know where i need to connected the data pin about the sensor in the CORE kit?

    Thank you very much for your help.



  • @kat said in M5Stack with a moisture sensore, Arduino IDE:

    Hello,
    I need to work with the module M5stack core kit V1.0 . I try to connect a moisture Funduino sensor to this module with a Arduino IDE but i cann't do it...
    Before i have try with the sensor DHT11 and i can receive the temperature, but with the moisture sensor i don't find anything. I connected:

    • to the GND
    • to 3,3 V
      S to GPIO22

    ![0_1556289977868_Unbenannt.PNG](Uploading 100%)

    The sensor use a analogic output, you know where i need to connected the data pin about the sensor in the CORE kit?

    Thank you very much for your help.

    Sorry you picture hasn't worked.

    • to 5V
    • to GND
      s to 35 or 36 on the black I/O base
      alt text
      then something like the following to read the pin.
    int analogPin = G35; // potentiometer wiper (middle terminal) connected to analog pin g35
                        // outside leads to ground and +5V
    int val = 0;  // variable to store the value read
    
    void setup() {
      Serial.begin(9600);           //  setup serial
    }
    
    void loop() {
      val = analogRead(analogPin);  // read the input pin
      Serial.println(val);          // debug value
    } 
    

    May I ask what you are planning to use the sensor for?



  • ok nice thank you for your help !

    I have connected the sensor to th pin 26 and it work.
    i want to know the humidity in the earth for my plants.



  • It' show this for example:
    moisture: 0
    moisture: 125
    moisture: 658
    moisture: 1254

    What i need to put in the program to have just one line with " moisture values : " and the values changes every 1seconds?
    Like a clock



  • @kat @Rop you need to create and M5ez project, create a text place holder and set the code to replace the text with the values. Hopefully @Rop will pick up the notification and help you out. My knowledge is more towards Uiflow