I have a servo that I need to spin left and then back after a half second. I have it working just fine. However, it may only work for 1 click... or 4 clicks... Then it will usually just spin left and not come back. Once that happens, all the widgets on the dashboard will not function. I have to unplug the box, plug it back in, return the servo to the start position and then try the function again. I am using firefox, but the same problem happens in safari. Here is my code (the X's are the widget ID numbers):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script language="javascript">
<!--
function ServoRoutine1(){
// assuming the servo is already at position A
widgetExecute('XXXXXXXXX'); // position B
setTimeout(ServoRoutine2,500);
}
function ServoRoutine2(){
widgetExecute('XXXXXXXXX'); // position A
}
//-->
</script>
</head>
<body>
<a onClick="ServoRoutine1()">Servo Routine</a>
<div id="ioWidgets" style="display:none;">
<script type="text/javascript">document.write(unescape("%3Cscript src='" + "
http://www.iobridge.com/widgets/io.js?XXXXXXXX' type='text/javascript'%3E%3C/script%3E"));</script>
<script type="text/javascript">document.write(unescape("%3Cscript src='" + "
http://www.iobridge.com/widgets/io.js?XXXXXXXX' type='text/javascript'%3E%3C/script%3E"));</script>
</div>
</body>
</html>