Very new to programming for the Arduino and have a problem I can't seem to resolve and would appreciate any help.
From an example I downloaded and edited for my wifi and mqtt server I was able to make the following work. "35" was just an arbitrary value I sent to see if it would show up in openHab and it does!
Then I connected a DHT22 sensor and am able to read the temperature and humidity and output to the serial monitor window. But it fails when trying to prepare for sending to the mqtt server. Here's what I've changed from the above example.
Appreciate the links and suggestions, but what I really need is an example of how to fix this.
I've spent several hours over the past 3 days putting this project together and then trying to figure out how to resolve the error and can't. As stated above this programming language is very new to me, I'm just starting out with this.
Why am I using that, because it was in the working example I found online...
If there is a better way to do it, then please show me.
p912s:
Appreciate the links and suggestions, but what I really need would like is an example of how to fix this. Aka, a pre-made program for my needs.
I've spent several hours over the past 3 days putting copy pasting this project together and then trying to figure out how to resolve the error and can't. As stated above this programming language is very new to me, I'm just starting out with this over my head complicated project.
Why am I using that, because it was in the working example I found online...
If there is a better way to do it, then please show me.
Thanks
Fixed the post for you.
Aka, if you don't know what something does don't just use it. Find out what it really does.
Most forum members don't like to write code for people who won't bother to learn the basics, or spend a lot of time trying to teach the basics in a post. The teaching part has already been done many times and is freely available on the web.
Consider also that snprintf() is possibly the most complex, versatile function in the C/C++ language.
If you want to purchase code-writing help, post on the "gigs and collaborations" section of the forum.
@econjack: the example you posted won't compile or work. Not sure what you are trying to do.
@jremington - justify your comments however you want. I participate in several forums and answer basic questions all the time for those starting out rather than berate them. Guess we just disagree on how one should conduct themselves on a forum. If you didn't want to help, you could have passed by and not said anything...
jremington: @econjack: the example you posted won't compile or work. Not sure what you are trying to do.
Actually, this worked quite well.
econjack:
More importantly, why does this change things?
Thanks for the help, when I get back home tonight I'll study this to try and understand what it did.