Hello all, this is my first project ever and I have a esp8266 with wifi and I copied the terracontrol v3 project on instructibles and everything works lovely other then my water level sensor, it’s a conductive sensor… a flat pcb with 10 metal lines on it, no matter what I do I cant seem to get the sensor to work, it will not output any readings. The sensor is connected to pin A0 and v+/ground respectively, any help would be greatly appreciated
Simply paste your code between ``` If you don’t format your code, your topic can be deleted by moderators.
Hello Peter, me either, this is the first time I have done anything like this, the project as a whole was a copy of a diy, but I am trying to the water level sensor into the project and I was trying to copy/paste the existing code and change the perimeters and I realize that is why the sensor does not seem to have any output, I have tried adjusting the code since last night with no avail… I will continue to look for a similar project and adjust/copy/paste till I get it to function
I guess that the V20 widget is meant to be configured with a Refresh Interval, which is meant to trigger the readings - which may be why it’s not working for you. But that’s a very poor approach to triggering the readings, especially when your code already includes a timed function to take readings.
Thanks Pete, so how would I go about assigning the level indicator to pin A0 and reading on blink, I don’t expect you to write the code for me but where would I look to start with?, This project is for a pet lizard and this is the last piece of the puzzle and as I stated, this is my first time programming anything or assembling anything like this.
Thank you Pete, I now get a ‘blynk’ does name a tye message when I try to compile the code with arduino ide. Below is the error copy/paste, I am assuming I now have a library error?
Arduino: 1.8.12 (Windows Store 1.8.33.0) (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), 4MB (FS:2MB OTA:~1019KB), 2, v2 Lower Memory, Disabled, None, Only Sketch, 115200"
TerraControl_v3.0_INSTRUCTABLES:47:1: error: 'Blynk' does not name a type
Blynk.virtualWrite(V20, 255); //sending to Blynk
^
TerraControl_v3.0_INSTRUCTABLES:48:1: error: 'Serial' does not name a type
Serial.print("Sensor A0 = ");
^
TerraControl_v3.0_INSTRUCTABLES:49:1: error: 'Serial' does not name a type
Serial.println(sensorValue);
^
TerraControl_v3.0_INSTRUCTABLES:50:1: error: expected declaration before '}' token
}
^
exit status 1
'Blynk' does not name a type
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Not sure what happened but it did compile and upload but still no activity on the sensor, Pete I am sure there are tons of “dumb” questions from newbies but I truly do appreciate the help you are providing
I have put the code you suggested in, it’s directly under “/----------------- WATER LEVEL SENSOR ----------------/” , clearly I have no idea what I am doing, I am guessing I placed the code in the wrong place?
I’ve already said that I do t understand why the code to read the analog sensor is in the BLYNK_WRITE(V20) callback function, and that you should add the code I provided in to your sensorRead function.
Paste the code I provided into your sensorRead function, after this line of code Blynk.virtualWrite(V9, humIN); but before the closing curly bracket }
Thank you so much Pete, that resolved it, should I remove the whole “/ ----------------- WATER LEVEL SENSOR ---------------- /” code above? and I can’t thank you enough for this, now I have to see if I can get an lcd to provide live feeds at the terrarium itself lol