EmonTX arduino shield without emonpi to domotic box directly, possible?

What Stephen is saying is the lines that begin if (ct... are necessary because those set the calibration for the inputs.

Your Serial.print(... statements should look like this:

    Serial.print(F("ct1:")); Serial.print(emontx.power1);  

    ...

    Serial.print(F(",ct2:")); Serial.print(emontx.power2);

    ...

    Serial.print(F(",vrms:")); Serial.print(ct1.Vrms);

as Paul wrote here: EmonTX arduino shield without emonpi to domotic box directly, possible? - #17 by pb66

Thank you all!

yes I suspected that it was not the good lines of codes … But i’m newbie in hard programmation…

@Robert.Wall: sorry but why did you added “F” in each line?

thank you all!

Don’t leave me alone before I find the good sketch :wink:

Not a problem, as long as @calagan57 knows that we are giving him different guides. My concern was that it might not be obvious that you were giving him a completely different option and that might have been confusing, but everyone now seems to know what’s what.

First off, sorry I didn’t get back to you last night, it was a long day and I passed out. I cannot promise the same won’t happen tonight either, I have just got in after another long hard day, I’m helping someone reclaim their paddock from the wild. It’s been left untamed for a substantial time.

Seems I landed on the wrong shield sketch, I was looking at the Shield_CT1234 not Shield_CT1234_Voltage (that’s what happens when you do stuff half asleep) so sorry about that.

So what I should have said was

It is just a more memory efficient way of printing text.

My suggested edits are very slightly different to @Robert.Wall’s sons, mine do nor use the same “F metheod” Robert suggests because I was trying to stay close to the pre-existing code to reduce any chance of confusion and I opted for grouping the serial prints to keep in line with the emonTx v3’as emonESP style output. Either methods will work, I just tried to keep it simple so it was obvious what the changes were and why. But I made a mess of that by getting the wrong sketch :smile:

So for clarity, Either method is ok, Roberts suggestion is more memory efficient and replaces each of the existing print lines (the lines numbers I’ve given above). My method simply removed existing scattered prints and added a single block, similar to the emonTx v3.4 firmware.

Don’t apologize especially for your absence Paul, on the contrary I am very surprised and delighted that many people come to help me (stephen, Robert…)! it’s more and more rare that people behave like that on the web! THANK YOU all!

If one day you come to france, I would be happy to welcome you at home! (sincerely) :slight_smile:

Thanks for the explanation and correction, I understand now :wink:
I note this and I come back to you as soon as I received the pre-programmed esp :wink:

thanks again!

2 Likes