Hi everyone,
I’m currently trying to use a soil moisture sensor via RJ25 adapter but I’m not able to read any measure. To be sure that there are no issues with the sensor, I uploaded the same code on an Arduino Uno and it’s working perfectly.
The code is the following:
/***************************************************
This is a sketch to test the soil sensor based
on the SHT10 temperature & humidity sensor
Written by Marco Schwartz for Open Home Automation
****************************************************/
// Include Sensirion library
#include <Sensirion.h>
// Sensor pins
const uint8_t dataPin = 12;
const uint8_t clockPin = 13;
// Variables for the temperature & humidity sensor
float temperature;
float humidity;
float dewpoint;
// Create sensor instance
Sensirion soilSensor = Sensirion(dataPin, clockPin);
void setup()
{
Serial.begin(9800);
}
void loop()
{
// Make a measurement
soilSensor.measure(&temperature, &humidity, &dewpoint);
// Print results
Serial.print("Temperature: ");
Serial.print(temperature);
Serial.print(" C, Humidity: ");
Serial.print(humidity);
Serial.print(" %");
Serial.println("");
// Wait 100 ms before next measurement
delay(100);
}
The result I get from the MeOrion is the following:
Temperature: 0.00 C, Humidity: 0.00 %
Which of course is not right. The Arduino Uno reads the correct values.
To be sure I connected the sensor to the right SLOTS (PORT3,SLOT1 and PORT3,SLOT2) I added to leds that are correctly blinking.
Can anyone help me into finding what is wrong with the MeOrion?
Thanks,
Diego