Emonth count gazmeter

Hello all,

I search a sketch that :

transmit temp from external DS18B20 soldered in 3,5,6.

transmit counting from a reed contact soldered in 2 and 4.

And if possible battery level.

I putted the R2 pull dowm resistor (8.2kohm).

 

Thank's for your help.

Robert Wall's picture

Re: Emonth count gazmeter

I do not know of a sketch that does exactly as you want.

A sketch for reading two temperatures is on Github: emonTH / emonTH_DHT22_dual_DS18B20

A sketch for reading a gas meter using a reflective optical sensor is on Github: emonTH / emonTH_gas_reflection_analogue

I suggest you start with the optical sensor sketch and change that so that it reads your reed switch, then add to that sketch the code for setting up and reading the two temperature sensors from the other sketch.

Patrice Diliakou's picture

Re: Emonth count gazmeter

Well...

I'll have a lot of questions about coding a sketch...

 

What is the pinout to program for irq0/dig2 ?

Robert Wall's picture

Re: Emonth count gazmeter

Schism's picture

Re: Emonth count gazmeter

The optical gas sketch is more complex than yours needs to be because it has to strobe the meter actively. It's vastly easier if you can use IRQ0 and a reed switch.

I don't have any sketches using an interrupt, but I did write the optical sketch, so I'll try to help out if you need a steer.

Patrice Diliakou's picture

Re: Emonth count gazmeter

Thank you for your answers.

For the link, i am already in It and it's not giving the pinout to insert in a sketch. I can see "Digital2" but how exploit it ?

Well you can understand that i'm not a developper and i discover this.

 

For the optical gas sketch, it's that i supposed. I want to exploit a reed contact with irq0 and i already placed a pull down resistor (R2) to the -.

 

I start with the standart sketch emonTH_DHT22_DS18B20 that deliver to me one temp ant battery report. I saw somewhere that i must consider the sleep parameter and other things.

My problem is : i dont understand this code and how it works.

It's because i asked if some people had made it before.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.