webiopi().ready(function() { webiopi().setFunction(21,"out"); // Create a "Pulse" labeled button for GPIO 21 button = webiopi().createSequenceButton("sos", "Cycle", 21, 500, "10"); // the last"01" vs "10" reverses action // Append button to HTML element with ID="controls" using jQuery $("#controls").append(button); // Refresh GPIO buttons // pass true to refresh repeatedly or false to refresh once webiopi().refreshGPIO(true);});
<!--Button--> <th> <div id="controls" align="center"></div> </th>
.controls.button { margin: 5px; background-color: #87CEFA; color: black; border-radius: 5px; text-align: center; width: 75px; height: 40px; font-size: 10pt;}