Automated Moisture Sensor

#include <LiquidCrystal.h>

LiquidCrystal lcd(7, 8, 9, 10, 11, 12);

void setup()

lcd.begin(16, 2);

lcd.print(“Hello, World!”);

void loop()

lcd.setCursor(0, 1);

lcd.print(millis() / 1000);

^^^There it is except for the curly braces^^^

Sorry (there’s a small bug with { }, we don’t currently have a fix but there are work around’s).

Is your wiring consistant with what you have declared in ```
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);


I only ask because the pin declarations are different than the declarations on the SFE tutorials.

Yes, it’s constant. I initially thought about defining them as variables, but I couldn’t really think of a reason to since the module will eventually be hardwired

The fact that the sketch works perfectly as a stand-alone makes me think that that part of the code is sound. The problem comes in when I try to embed it into the weather shield sketch. I have added the soil moisture sensor to the weather shield sketch and verified that that code works perfectly with or without the lcd code added in. The serial monitor output is identical either way. The file uploads fine. It just outputs gibberish to the lcd.

My apologies, I thought the LCD wasn’t working at all. We can’t guarantee or offer full custom code support, but I will try as much as I can. Could you post your humidity full code in GitHub or upload a text file of it?

Totally. I’m 100% not expecting that. I just thought you might have like a quick suggestion since all the code’s SF, and you guys know like mountains more than me. Not trying to abuse your time :slight_smile: For some reason I can’t attach a text file or an Arduino sketch. Do you know what kinds of files I can attach? Try [this link to my GitHub. It was set to private before.

HelloWorld is exactly what I posted earlier in the comments.

WeatherNode01 is straight up your Arduino weather shield sketch with your soil moisture sensor sketch embedded (totally works – the compiler throws me some messages, but it compiles and uploads and outputs every time).

WeatherNode_20-03-15_01 = [WeatherNode01] + [HelloWorld]. The weather node bit works the same (serial monitor and all), but the LCD displays gibberish.

I’m sorry this became so problematic. Didn’t mean to take you down a rabbit hole](GitHub - evanlavin/evanlavin.github.io: Planet Evan)

No worries. I said I’ll try my best.

So first look at WeatherNode_20-03-15_01.ino, it does seem logically correct. Serial and lcd.print() aren’t conflicting because the LCD uses SPI lines. When you run this code, you don’t even get the “Hello World” message?

No, I get “fff” splashed for like a second and then nothing. Before I was getting like random assortments of question marks. Idk why it changed.