function connectPhidgets() {
var local = location.hostname; //get host location
var conn = new phidget22.Connection(8080, local);
conn.connect().then(runExample);
}
What is happening here? Why would I need to do this in a web page (index.html), in python I just open the DigitalOutput without making any "connection"?
From the browser, Phidgets are opened via the phidget22networkserver. The Connection object is creating a connection to the local server to access the Phidgets. Other languages have different APIs for the network connection options.
Make sure your network server is installed and running. I saw you made some other posts - if things work properly and then stop working, make sure that the network server daemon is still running, or have a look in the network server logs to see what may be wrong.
I don't know how to check for those things, but I suddenly realized that the problem now seems to be user rights again, which I am discussing in another thread (I can't run phidget22admin without sudo).
So I'm happy with the answer here for now, I was just wondering what the "connection" was for.