Posted by portugalmidi
What steps will reproduce the problem?
How can I change GPIO (4) direction to out at RI boot
I'm using this code but GPIO 4 is in IN mode at startup
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "https://www.w3.o$ <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="viewport" content = "height = device-height, width = 420, u$ <title>WebIOPi | Control your Pi's GPIO</title> <script type="text/javascript" src="/webiopi.js"></script> <script type="text/javascript">
webiopi().ready(function() {
var content, button;
content = $("#content");
WebIOPi.prototype.map(4,"OUT",0);
button = webiopi().createGPIOButton(4, "1");
content.append(button);
});
function mousedown() {
webiopi().setValue(4, 1);
}
function mouseup() {
webiopi().setValue(4, 0);
}
</script>
<style type="text/css">
button {
display: block;
margin: 5px 5px 5px 5px;
width: 360px;
height: 45px;
font-size: 24pt;
font-weight: bold;
color: White;
}
#gpio7.LOW {
background-color: White;
}
#gpio7.HIGH {
background-color: Red;
}
</style>
</head> <body> <div id="content" align="center"></div> </body> </html>
Raspberry Pi board revision? (1 or 2) =>2
Posted by trouch
See https://code.google.com/p/webiopi/wiki/PYTHON Then come back on the google group instead of bugtracker is you still have questions.