Skip to content

Customize on value for radial gauge #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
edhoy86 opened this issue Oct 29, 2023 · 0 comments
Open

Customize on value for radial gauge #5

edhoy86 opened this issue Oct 29, 2023 · 0 comments

Comments

@edhoy86
Copy link

edhoy86 commented Oct 29, 2023

Hi,

Very nice component, I'm new for HTML coding.
I'm using radial gauge and linear gauge, and having difficulty to show my sensor value from arduino on "value" gauge using AJAX, here is my code to retrieve data value from arduino,

function GetArduinoInputs()
{
nocache = "&nocache=" + Math.random() * 1000000;
var request = new XMLHttpRequest();
request.onreadystatechange = function()
{
if (this.readyState == 4) {
if (this.status == 200) {
if (this.responseXML != null) {
this.responseXML.getElementsByTagName('analog')[0].childNodes[0].nodeValue;
this.responseXML.getElementsByTagName('analog')[1].childNodes[0].nodeValue;
data_val = this.responseXML.getElementsByTagName('analog')[0].childNodes[0].nodeValue;
data_val2 = this.responseXML.getElementsByTagName('analog')[1].childNodes[0].nodeValue;

                    }
                }
            }
        }
        request.open("GET", "ajax_inputs" + nocache, true);
        request.send(null);
        setTimeout('GetArduinoInputs()', 200);   
    }

My point is to show sensor value to radial gauge and linear gauge which is "data_value" and "data_val2" . Any advice much appreciate it.

Many thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant