ACS714 Current sensor code and diagram

I am trying to get this sensor working and have searched on a number of sites for the correct code for it to work 100%.
There are numorous examples but none are 100% correct.
Is there anybody who has solved the riddle of using the ACS714T-LLC-05B to accurately measure 220v current between 50 and 700 mA.
If so can you please post your code and sketch

Welcome to the forum.

What are the values you got ? why are they wrong ?
Which sensor board are you using ? where did you buy it ?
Can you upload a photo how your setup is ?

That is a 5A sensor ? To use that to measure 50mA is not accurate. Those sensors are sensitive for magnetic influences from wires and transformers.