You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every function has device_name as last and optional parameter for checking another devices without ever having setKey again.
'Multi' functions will accept lists of numbers as argument(like pins, values) and will return Promise that return a list of numbers.
Read functions will return Promises that return the read value as string.
Write functions will return Promises that return the written value. (would be the same as the one provided as argument)
In general, every function will return every property(except "success" and with the same name and order) that is returned by the respective command, if number of properties is >1, the function will return an object with them. (in a Promise)
In case of error / failure, the function will return an object with name and message as properties.
// Reading state of a pindigitalMultiRead(pins).then(console.log).catch(console.error)// Writing statemyElem.onclick=asynce=>{try{letresponse=awaitservoWrite(pin,e.target.value)myDisplayElem.innerText='Successfully changed value of ..'}catch(er){myDisplayElem.innerText=e.name+' : '+e.message}}// Utiliesrestart().then(/*Do something*/).catch(/*Do something*/)