Phidget beginner here, hopefully someone can help me with a few questions that I have not yet found an answer to:
First of all, what does the "5000" in “ch.open(5000)” mean? I assume that's a timeout? This is never explained in the tutorial.
Another thing that has puzzled me: why is it important to close the connection? We will use phidgets to control some simple servos and LEDs, but as long as the session is running I don't see a reason to ever close a connection... Does that have any disadvantages I am not aware of?
Is it possible to check if a connection is already open? The examples I used always do this:
Code: Select all
ch.open(5000).then(function() { ch.setDutyCycle(1); });
Code: Select all
if (ch.isOpen) { ch.setDutyCycle(1); });