Skip to content

Doesn´t work with NANOESP32 #155

@dzech

Description

@dzech

I want to use your library with the SDI-Adapter from IRROMETER (https://www.irrometer.com/pdf/426.pdf)
The simple code works with the MEGA 2560 but not with the NANOESP32 although the specifications say all ESPs should work.
On the NANOESP32 I use D7 as data pin.

#include <SDI12.h>
#define DATA_PIN 12
SDI12 mySensor(DATA_PIN);

void setup() {
Serial.begin(9600);
mySensor.begin();
delay(1000);
}

void loop() {

mySensor.sendCommand("0I!");
delay(320);

String response = "";
while (mySensor.available()) {
char c = mySensor.read();
response += c;
delay(50);
}
Serial.print("Wert: ");
Serial.println(response);

delay(3000); //milliseconds
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions