Hi,
I assume you get readings in between 0-560. That is exactly how it should be. With DEFAULT reference you measure 0-1023 which correspond to 0-5V. So 5/1023*560 equals 2.74V. See updated example for SoilWatch 10 below:
/*
SoilWatch 10 soil moisture sensor example
Reads analog value of soil moisture sensor and displays it
on serial port.
The circuit:
* Sensor output (white wire) connect to Analog A0 on Arduino.
Connect VCC (brown wire) to 3.3V or 5V on Arduino (3.3V gives more stable readings)
Connect GND (green wire) to GND on Arduino.
created 30 Aug. 2017
last update 9 Feb 2018
by Piotr Trembecki
https://pino-tech.eu/sw10
This example code is in the public domain.
*/
/*
******** SETUP ********
For 1.1V version set is1V1Output to true. A usual maxADC value will be around 1000.
For 3V version set is1V1Output to false. A usual maxADC value will be around 600.
***********************
*/
const int analogInPin = A0; // Analog input pin that the sensor output is attached to (white wire)
int minADC = 0; // replace with min ADC value read in air
int maxADC = 600; // replace with max ADC value read fully submerged in water
bool is1V1Output = false; // set true if 1.1V output sensor is used for 3V set to false
int moistureValue, mappedValue;
void setup() {
// initialize serial communications at 9600 bps:
Serial.begin(9600);
if(is1V1Output == true)
analogReference(INTERNAL); //set ADC reference to internal 1.1V
}
void loop() {
// read the moisture value:
moistureValue = analogRead(analogInPin);
// print ADC results to the serial monitor:
Serial.print("ADC = " );
Serial.print(moistureValue);
Serial.print(", " );
mappedValue = map(moistureValue,minADC,maxADC, 0, 100);
// print mapped results to the serial monitor:
Serial.print("Moisture value = " );
Serial.println(mappedValue);
// wait 500 milliseconds before the next loop
delay(500);
}
Please let me know if this sorted out your issue.