BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Compile issue moisture sensor ESP8266


#1

Hello
I would really like help with my project. I’m trying to set up the ESP8266 with Blynk to install a soil moisture sensor, but I’m having a compile error. I already installed the libraries but I still can not finish the compilation! Here is a print about the error. Grateful


#2

Not a Blynk related question.

Incorrect or invalid library: Adafruit_sensor.h

This will help you: https://learn.sparkfun.com/tutorials/soil-moisture-sensor-hookup-guide


#3

Got it. The soil moisture sensor does not work very well just with blynk programming, I can not get a humidity scale ranging from 0 to 100 in blynk, so I’m trying to program this before compiling and using blynk.


#4

Not sure what you’re talking about… working fine in my Garden Project.

Blynk works with everything.

A fix for your issue is as simple as removing those broken libs and putting in two lines:

int moistureSensor = analogRead(A0);
moistureSensor = map(moistureSensor, 0, 1023, 0, 100); // output 0-100%

Take a look at project Garduino to see the code in action (in Sensor)


#6

I compiled with just those line but it still did not work. Now the blynk Gauge remained unsuccessful. The Gauge would have to show information on a scale of 0 - 100 on soil moisture.
I still have issues with the code to make this work.

Blynk screenshot on my smartphone
https://www.4shared.com/photo/S_v6wxi4ce/Blynk.html
My code on sketch
https://www.4shared.com/photo/2EMxERp6ba/sketch_esp8266-01.html

can you help me


#7

You have LOTS of reading to do.

Im not sure you have even tried the examples provided by Blynk… if you had, you would know where you are going wrong.


#8

@irwingbarreto let’s see where you have got to with your sketch.

Take a look at the animated gif on posting code at [README] Welcome to Blynk Community! and then post yours.


#11

You don’t need to delete your unformatted sketches, simply edit them until they are displayed correctly.
Don’t you see the preview window before you click the Reply button?