Water level sensor

Very new to Mbed, looking to use water level sensors for a college project but can get anything to work. I have a Seeed Grove water level sensor and a basic Arduino water level senor. how would i go about coding this?


according to Grove - Water Sensor | Seeed Studio Wiki, it works jus with Digital I/O or ADC. So the choice is up to you.

In case of ADC you will need switch from basic library settings to STD because of printing floats.
So if you do not have it in your project then create file called mbed_app.json in the root folder of your project. Place the content below inside and then make clean build.

    "target_overrides": {
      "*": {
        "target.c_lib": "std",
        "target.printf_lib": "std"

BR, Jan