emonTH v2 Basic Sketch

Hey Everyone -

I purchased the new emonTH v2 units and just figured out that my sketchs for my v1s (DS1820bs) don’t seem to work. So I downloaded the really long and very complicated looking example from github with pulse sensors, internal sensors, external sensors, serial configuration menus and the like, but had a lot of issues getting it to compile.

I am running the Arduino IDE and have no desire to switch to anything else just for the sake of using the emonTH. I have all the necessary libraries but still having issues.

I was hoping someone had a very basic sketch that just had the internal temp/humidity sensor on it and none of the other sensors (external ds1820Bs, pulse, etc). Or if it exists somewhere, maybe I missed it.

Many Thanks !!

What about borrowing from “emontx_lowpower_DHT22humidity.ino” in emontx2/firmware/emonTx_temperature_examples/emontx_lowpower_temperature_humidity at master · openenergymonitor/emontx2 · GitHub ?

It’s for the emonTx, so you’ll need to look at the circuit diagrams and change the I/O pins accordingly, or just use that to identify the important parts in the sketch you’ve tried and get rid of the rest. I can’t see very much in there apart from temperature and humidity reading, and it hasn’t been screwed up with Platformio, so it should compile in the Arduino IDE. If you need documentation for installing the required libraries, ask (and say which OS you have). It’s been deleted from this site, but I’ve got a copy.

Good Morning Robert -

Thanks. I was thinking (or more hoping) that maybe someone with the V2 emonTH with the new sensor had done one up, but you are right…I think the best way to learn the layout of the new V2 is to try and take the example sketch and work with it since it calls all of the libraries necessary for the new sensor.