You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use the T-Beam to read a soil moisture sensor. I have used a voltage divider circuit with R1 being 10k and R2 being 20k. I get a reading from the output of the sensor of approx. 3.6V and approx. 2.4V from the output of the voltage divider. The readings were done using my Fluke 117 multimeter.
However, both pin 33 and pin 35 read 0 value using the Arduino analogRead with the 2.4V. Using the 3.6V directly I do get a result, however they're very different, with pin 33 reading approx. 1100 and pin 35 reading approx. 2800.
This is the code:
`
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(34,INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println("strt");
Serial.println(analogRead(33));
Serial.println(analogRead(34));
Serial.println(analogRead(35));
Serial.println("Wai");
delay(1000);
}
`
And this is the diagram of my circuit:
Do you have any idea, why this is happening?
The text was updated successfully, but these errors were encountered:
I am trying to use the T-Beam to read a soil moisture sensor. I have used a voltage divider circuit with R1 being 10k and R2 being 20k. I get a reading from the output of the sensor of approx. 3.6V and approx. 2.4V from the output of the voltage divider. The readings were done using my Fluke 117 multimeter.
However, both pin 33 and pin 35 read 0 value using the Arduino analogRead with the 2.4V. Using the 3.6V directly I do get a result, however they're very different, with pin 33 reading approx. 1100 and pin 35 reading approx. 2800.
This is the code:
`
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(34,INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println("strt");
Serial.println(analogRead(33));
Serial.println(analogRead(34));
Serial.println(analogRead(35));
Serial.println("Wai");
delay(1000);
}
`
And this is the diagram of my circuit:
Do you have any idea, why this is happening?
The text was updated successfully, but these errors were encountered: