Unable to configure Hall effect current sensor to Raspberry Pi 3b

Here is some code to read the sensor

Here is an example of uploading data to Cayenne with MQTT via python on the Pi.