🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    M5Stack with a moisture sensore, Arduino IDE

    Cores
    2
    5
    8.7k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      kat
      last edited by

      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.

      ajb2k3A 1 Reply Last reply Reply Quote 0
      • ajb2k3A
        ajb2k3 @kat
        last edited by ajb2k3

        @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?

        UIFlow, so easy an adult can learn it!
        If I don't know it, be patient!
        I've ether not learned it or am too drunk to remember it!
        Author of the WIP UIFlow Handbook!
        M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

        1 Reply Last reply Reply Quote 0
        • K
          kat
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • K
            kat
            last edited by

            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

            ajb2k3A 1 Reply Last reply Reply Quote 0
            • ajb2k3A
              ajb2k3 @kat
              last edited by

              @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

              UIFlow, so easy an adult can learn it!
              If I don't know it, be patient!
              I've ether not learned it or am too drunk to remember it!
              Author of the WIP UIFlow Handbook!
              M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

              1 Reply Last reply Reply Quote 0
              • First post
                Last post