Skip to content

Instantly share code, notes, and snippets.

@Akkiesoft
Created Feb 15, 2015
Embed
What would you like to do?
EjectAir
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>EjectAir</title>
<script language="javascript" type="text/javascript">
<!--
//関数:FlashAirに対してHTTP通信 GETをする
function flashair_get( param ){
var request = new XMLHttpRequest();
request.open("GET", param, false);
request.send(null);
//通信結果
//document.getElementById('RESULT').value += (request.responseText+"\r\n");
}
//関数:GPIOポートをすべてLow
function gpio_off(){
var url = "http://flashair/command.cgi?op=190&CTRL=0x1f&DATA=0x00";
flashair_get(url);
p = 0x00;
}
//グローバル変数定義
var send_mess = "http://flashair/command.cgi?op=190&CTRL=0x1f&DATA=0x";
var p = 0x00;
//関数:任意のポートをHigh⇒Lowにする(=ショットスイッチ)
function gpio_shot(port){
switch( port ){
case 1:
gpio_onoff(1); //[ON]
setTimeout("gpio_onoff(-1)",300); //300ms後[OFF]
break;
}
}
//関数:任意のポートをHigh/Lowにする
function gpio_onoff(port){
switch( port ){
case 1: //[ON]
p |= 0x10;
url = send_mess + p.toString(16);
flashair_get(url);
break;
case -1: //[OFF]
p &= (~0x10);
url = send_mess + p.toString(16);
flashair_get(url);
break;
}
}
// -->
</script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
* { padding:0; margin:0; }
html {
height:100%;
}
body {
margin :auto;
height :100%;
background: rgb(244,231,186); /* Old browsers */
background: -moz-linear-gradient(45deg, rgba(244,231,186,1) 1%, rgba(224,200,145,1) 40%, rgba(255,219,122,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left bottom, right top, color-stop(1%,rgba(244,231,186,1)), color-stop(40%,rgba(224,200,145,1)), color-stop(100%,rgba(255,219,122,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(45deg, rgba(244,231,186,1) 1%,rgba(224,200,145,1) 40%,rgba(255,219,122,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(45deg, rgba(244,231,186,1) 1%,rgba(224,200,145,1) 40%,rgba(255,219,122,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(45deg, rgba(244,231,186,1) 1%,rgba(224,200,145,1) 40%,rgba(255,219,122,1) 100%); /* IE10+ */
background: linear-gradient(45deg, rgba(244,231,186,1) 1%,rgba(224,200,145,1) 40%,rgba(255,219,122,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4e7ba', endColorstr='#ffdb7a',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
}
@font-face {
font-family: "Sketch Block";
src: url(/SD_WLAN/Sketch_Block.ttf) format("truetype");
}
h1 {
padding:10px;
font-family:"Sketch Block";
font-size:42pt;
}
#box {
position:absolute;
bottom:0px;
right:10px;
z-index: -2;
}
#mugiko {
height:400px;
}
form { margin-left:10px;margin-top:50px;font-family:sans-serif; }
#button {
margin-top:10px;
padding: 0 5px;
background-color:#dadada;
border-top :1px solid #959595;
border-left :1px solid #959595;
border-bottom:1px solid #656565;
border-right :1px solid #656565;
border-radius: 5px;
}
</style>
</head>
<!-- ロードされたとき、ポートを全てOFFする -->
<body onLoad="gpio_off()">
<div id="box">
<img src="/SD_WLAN/mugiko.png" id="mugiko">
</div>
<h1>Eject Air</h1>
<form>
\Tap here!/<br>
<svg
onclick="gpio_shot(1)"
id="button"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
viewBox="0 0 160.00001 50.000002"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="uiiin.svg"
width="100"
height="50">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.4142136"
inkscape:cx="331.04169"
inkscape:cy="264.2827"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1876"
inkscape:window-height="1156"
inkscape:window-x="103"
inkscape:window-y="0"
inkscape:window-maximized="0" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1002.363)">
<g
style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="text3336"
transform="translate(-163.34167,603.86919)">
<path
d="m 177.60883,409.16467 q -4.0625,3.04688 -5.60547,7.32422 -1.23047,3.45703 -1.23047,9.23828 0,5.50782 1.30859,8.96485 1.52344,4.0625 5.42969,7.14843 l -0.58594,0.80079 q -9.78515,-6.32813 -9.78515,-17.28516 0,-11.03516 9.88281,-17.12891 l 0.58594,0.9375 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:125%;font-family:Mshtakan;-inkscape-font-specification:'Mshtakan, Normal';text-align:start;writing-mode:lr-tb;text-anchor:start"
id="path3496"
inkscape:connector-curvature="0" />
<path
d="m 228.80023,412.6217 q 0,1.54297 -0.97656,2.63672 -0.97656,1.09375 -2.5,1.09375 -1.38672,0 -2.34375,-0.99609 -0.95703,-1.01563 -0.95703,-2.40234 0,-0.97657 0.66406,-1.60157 0.68359,-0.625 1.66016,-0.625 1.11328,0 2.22656,1.09375 0.0781,-0.0976 0.0781,-0.2539 0,-0.78125 -1.15234,-1.38672 -0.99609,-0.50781 -1.89453,-0.50781 -2.79297,0 -3.94531,1.67968 -1.13282,1.66016 -1.9336,4.51172 -0.41015,1.50391 -0.70312,1.50391 -0.50781,0 -0.50781,-1.58203 0,-3.37891 1.67968,-5.54688 1.85547,-2.38281 5.11719,-2.38281 2.30469,0 3.82813,1.21094 1.66015,1.30859 1.66015,3.55468 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:125%;font-family:Mshtakan;-inkscape-font-specification:'Mshtakan, Normal';text-align:start;writing-mode:lr-tb;text-anchor:start"
id="path3498"
inkscape:connector-curvature="0" />
<path
d="m 256.9057,414.43811 0,1.11328 q 0,6.875 -5.76172,8.8086 2.5,1.99218 2.5,5.01953 0,2.42187 -1.79687,4.17968 -1.77735,1.75782 -4.6875,1.75782 -4.47266,0 -8.10547,-5.13672 -3.63281,-5.13672 -3.63281,-14.45313 l 0,-1.28906 -2.51954,0 0,-2.32422 2.67579,0 q 0.76171,-4.80469 3.71093,-7.63672 2.94922,-2.83203 6.9336,-2.83203 2.85156,0 5.05859,1.3086 2.22656,1.30859 3.63281,3.61328 1.40625,2.30468 1.75782,5.54687 l 3.53515,0 0,2.32422 -3.30078,0 z m -18.84766,-2.32422 16.23047,0 q -0.42968,-3.49609 -2.59765,-5.85937 -2.16797,-2.38282 -5.46875,-2.38282 -3.4375,0 -5.54688,2.46094 -2.10937,2.44141 -2.61719,5.78125 z m 16.42579,2.32422 -16.64063,0 0,2.22656 q 0,3.65235 0.64453,6.03516 l 8.76953,0 q 7.22657,0 7.22657,-7.20703 l 0,-1.05469 z m -8.53516,10.41016 -6.93359,0 q 0.99609,3.61328 3.39843,5.91797 2.42188,2.30468 5.07813,2.30468 1.95312,0 2.94922,-1.11328 1.01562,-1.11328 1.01562,-2.65625 0,-1.95312 -1.5039,-3.20312 -1.50391,-1.25 -4.00391,-1.25 z m -6.28906,16.36718 0,-1.89453 q 3.47656,0.56641 6.62109,0.56641 4.21875,0 6.91406,-0.52734 l 0,1.93359 q -2.87109,0.46875 -6.71875,0.46875 -3.26172,0 -6.8164,-0.54688 z m 0,4.1211 0,-1.89453 q 3.61328,0.58593 6.62109,0.58593 4.17969,0 6.91406,-0.54687 l 0,1.93359 q -2.92968,0.48828 -6.77734,0.48828 -2.98828,0 -6.75781,-0.5664 z m 11.93359,-10.11719 0,0 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:125%;font-family:Mshtakan;-inkscape-font-specification:'Mshtakan, Normal';text-align:start;writing-mode:lr-tb;text-anchor:start"
id="path3500"
inkscape:connector-curvature="0" />
<path
d="m 280.83148,412.6217 q 0,1.54297 -0.97656,2.63672 -0.97656,1.09375 -2.5,1.09375 -1.38672,0 -2.34375,-0.99609 -0.95703,-1.01563 -0.95703,-2.40234 0,-0.97657 0.66406,-1.60157 0.68359,-0.625 1.66016,-0.625 1.11328,0 2.22656,1.09375 0.0781,-0.0976 0.0781,-0.2539 0,-0.78125 -1.15234,-1.38672 -0.99609,-0.50781 -1.89453,-0.50781 -2.79297,0 -3.94531,1.67968 -1.13282,1.66016 -1.9336,4.51172 -0.41015,1.50391 -0.70312,1.50391 -0.50781,0 -0.50781,-1.58203 0,-3.37891 1.67968,-5.54688 1.85547,-2.38281 5.11719,-2.38281 2.30469,0 3.82813,1.21094 1.66015,1.30859 1.66015,3.55468 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:125%;font-family:Mshtakan;-inkscape-font-specification:'Mshtakan, Normal';text-align:start;writing-mode:lr-tb;text-anchor:start"
id="path3502"
inkscape:connector-curvature="0" />
<path
d="m 296.76898,425.25842 q 0,5.72266 -2.51953,10.01953 -2.32422,4.02344 -7.22656,7.40235 l -0.50781,-0.91797 q 3.94531,-3.4375 5.35156,-7.20703 1.17187,-3.20313 1.17187,-8.90625 0,-5.9375 -1.15234,-9.16016 -1.40625,-3.86719 -5.46875,-7.42187 l 0.56641,-0.80078 q 4.57031,2.77343 7.14843,7.20703 2.63672,4.51172 2.63672,9.78515 z"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:125%;font-family:Mshtakan;-inkscape-font-specification:'Mshtakan, Normal';text-align:start;writing-mode:lr-tb;text-anchor:start"
id="path3504"
inkscape:connector-curvature="0" />
</g>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="34.285713"
y="460.93362"
id="text3340"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3342"
x="34.285713"
y="460.93362" /></text>
<g
style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="text3344"
transform="translate(-163.34167,603.86919)">
<path
d="m 203.51575,435.83475 q 0.9375,-1.40625 0.9375,-4.6875 0,-0.78125 -0.15625,-1.875 -0.9375,1.40625 -2.5,1.875 l -0.46875,-1.09375 q 1.40625,-0.46875 2.34375,-1.71875 1.09375,-1.5625 1.09375,-3.125 0,-0.625 0,-0.9375 -0.15625,-1.71875 -1.71875,-2.03125 0.15625,0.78125 0,2.1875 -0.3125,4.21875 -3.75,5.78125 l -0.46875,-1.09375 q 2.96875,-1.25 3.125,-5.3125 0.15625,-3.4375 -1.5625,-3.4375 -0.15625,0.15625 -0.46875,0.15625 0.15625,0.15625 0.15625,0.3125 0.15625,0.3125 -0.15625,0.625 0.625,0.625 0.625,1.40625 0,1.09375 -0.9375,2.5 -0.78125,1.40625 -2.34375,2.5 2.03125,2.65625 2.03125,5.625 0.15625,2.34375 -0.3125,3.75 l -1.09375,-0.3125 q 0.3125,-0.9375 0.3125,-2.34375 0.15625,-3.59375 -2.1875,-6.5625 l -0.46875,-0.46875 0.625,-0.3125 q 1.5625,-0.9375 2.34375,-2.34375 0.9375,-1.25 0.9375,-2.03125 0.15625,-0.625 -0.625,-0.625 -0.625,0 -1.875,0.625 -1.71875,0.9375 -3.125,2.96875 -1.5625,2.5 -1.71875,5.46875 l -1.09375,-0.15625 q 0.3125,-3.125 1.875,-5.78125 1.5625,-2.5 3.4375,-3.4375 1.40625,-0.78125 2.5,-0.78125 0.15625,-0.15625 0.15625,-0.3125 0.15625,-0.15625 -0.15625,-0.46875 -0.46875,-0.78125 -1.71875,-0.78125 -2.34375,0 -3.28125,3.59375 l -1.09375,-0.15625 q 0.625,-4.21875 0.625,-8.59375 0,-3.59375 -0.46875,-5.15625 -0.15625,-0.78125 -0.9375,-0.9375 -0.78125,0 -1.09375,1.5625 -1.25,6.40625 -1.25,12.34375 0,10.78125 3.59375,17.96875 l 0.15625,0.3125 -0.15625,0.3125 q -0.625,0.9375 -1.40625,1.875 l 10.78125,0 q -0.46875,-1.25 -0.625,-2.5 0,-1.875 1.5625,-4.375 z M 202.7345,420.991 q 1.40625,0.15625 2.5,1.40625 0.625,0.78125 0.625,2.1875 0.15625,1.875 -0.46875,3.125 0.3125,1.875 0.15625,3.4375 0,3.4375 -1.09375,5.15625 -1.09375,1.875 -1.25,3.59375 0,1.25 0.625,3.125 l 0.3125,0.78125 -14.375,0 0.625,-0.9375 q 0.9375,-1.25 1.71875,-2.5 -3.59375,-7.8125 -3.59375,-18.125 0,-5.9375 1.25,-12.5 0.46875,-2.34375 2.1875,-2.5 1.5625,0 2.03125,1.71875 0.46875,1.71875 0.46875,5.3125 0,2.8125 -0.3125,5.78125 1.09375,-1.25 2.5,-1.5625 0.15625,0 0.46875,0 1.5625,0 2.34375,0.9375 0.46875,-0.15625 0.9375,-0.15625 1.71875,0 2.34375,1.71875 z"
id="path3478"
inkscape:connector-curvature="0" />
</g>
<g
style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="text3442"
transform="translate(-163.34167,603.86919)">
<path
d="m 317.95105,435.83478 q 0.9375,-1.40625 0.9375,-4.6875 0,-0.78125 -0.15625,-1.875 -0.9375,1.40625 -2.5,1.875 l -0.46875,-1.09375 q 1.40625,-0.46875 2.34375,-1.71875 1.09375,-1.5625 1.09375,-3.125 0,-0.625 0,-0.9375 -0.15625,-1.71875 -1.71875,-2.03125 0.15625,0.78125 0,2.1875 -0.3125,4.21875 -3.75,5.78125 l -0.46875,-1.09375 q 2.96875,-1.25 3.125,-5.3125 0.15625,-3.4375 -1.5625,-3.4375 -0.15625,0.15625 -0.46875,0.15625 0.15625,0.15625 0.15625,0.3125 0.15625,0.3125 -0.15625,0.625 0.625,0.625 0.625,1.40625 0,1.09375 -0.9375,2.5 -0.78125,1.40625 -2.34375,2.5 2.03125,2.65625 2.03125,5.625 0.15625,2.34375 -0.3125,3.75 l -1.09375,-0.3125 q 0.3125,-0.9375 0.3125,-2.34375 0.15625,-3.59375 -2.1875,-6.5625 l -0.46875,-0.46875 0.625,-0.3125 q 1.5625,-0.9375 2.34375,-2.34375 0.9375,-1.25 0.9375,-2.03125 0.15625,-0.625 -0.625,-0.625 -0.625,0 -1.875,0.625 -1.71875,0.9375 -3.125,2.96875 -1.5625,2.5 -1.71875,5.46875 l -1.09375,-0.15625 q 0.3125,-3.125 1.875,-5.78125 1.5625,-2.5 3.4375,-3.4375 1.40625,-0.78125 2.5,-0.78125 0.15625,-0.15625 0.15625,-0.3125 0.15625,-0.15625 -0.15625,-0.46875 -0.46875,-0.78125 -1.71875,-0.78125 -2.34375,0 -3.28125,3.59375 l -1.09375,-0.15625 q 0.625,-4.21875 0.625,-8.59375 0,-3.59375 -0.46875,-5.15625 -0.15625,-0.78125 -0.9375,-0.9375 -0.78125,0 -1.09375,1.5625 -1.25,6.40625 -1.25,12.34375 0,10.78125 3.59375,17.96875 l 0.15625,0.3125 -0.15625,0.3125 q -0.625,0.9375 -1.40625,1.875 l 10.78125,0 q -0.46875,-1.25 -0.625,-2.5 0,-1.875 1.5625,-4.375 z m -0.78125,-14.84375 q 1.40625,0.15625 2.5,1.40625 0.625,0.78125 0.625,2.1875 0.15625,1.875 -0.46875,3.125 0.3125,1.875 0.15625,3.4375 0,3.4375 -1.09375,5.15625 -1.09375,1.875 -1.25,3.59375 0,1.25 0.625,3.125 l 0.3125,0.78125 -14.375,0 0.625,-0.9375 q 0.9375,-1.25 1.71875,-2.5 -3.59375,-7.8125 -3.59375,-18.125 0,-5.9375 1.25,-12.5 0.46875,-2.34375 2.1875,-2.5 1.5625,0 2.03125,1.71875 0.46875,1.71875 0.46875,5.3125 0,2.8125 -0.3125,5.78125 1.09375,-1.25 2.5,-1.5625 0.15625,0 0.46875,0 1.5625,0 2.34375,0.9375 0.46875,-0.15625 0.9375,-0.15625 1.71875,0 2.34375,1.71875 z"
id="path3493"
inkscape:connector-curvature="0" />
</g>
</g>
</svg>
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment