Änderungen

Aus Hackerspace Ffm
Wechseln zu: Navigation, Suche

OmnibotWebcontrol

2.142 Byte entfernt, 07:32, 12. Aug. 2017
Der Seiteninhalt wurde durch einen anderen Text ersetzt: „https://www.youtube.com/watch?v=WxPTA3W4Ek0 https://github.com/hackffm/OminibotWebRemote“
<pre>https://www.youtube.com/watch?v=WxPTA3W4Ek0
<!DOCTYPE html><html><body> <button onmouseup="myFunctionOff()" onmousedown="myFunctionOn(1600)">Forward<https:/button><button onmouseup="myFunctionOff()" onmousedown="myFunctionOn(2000)">Backward</button><button onmouseup="myFunctionOff()" onmousedown="myFunctionOn(2200)">Left</button><button onmouseup="myFunctionOff()" onmousedown="myFunctionOn(1800)">Right</button><button onmouseup="myFunctionOff()" onmousedown="myFunctionOn(1400)">BeepmodeOn</button><button onmouseup="myFunctionOff()" onmousedown="myFunctionOn(2600)">Test2</button><button onmouseup="myFunctionOff()" onmousedown="myFunctionOn(2400)">Test3</button><button onmouseup="myFunctionOff()" onmousedown="myFunctionOn(2800)">Test4</button><button onmouseup="myFunctionOff()" onmousedown="myFunctionOn(1200)">LeftForward</button><button onmouseup="myFunctionOff()" onmousedown="myFunctionOn(1000)">LeftBackward</button><button onmouseup="myFunctionOff()" onmousedown="myFunctionOn(800)">RightForward</button><button onmouseup="myFunctionOff()" onmousedown="myFunctionOn(4600)">BeepmodeOff</button><button onmouseup="myFunctionOff()" onmousedown="myFunctionOn(163)">LowBeep</button><input id="slider2" type ="range" min ="50" max="10000" step ="50" value ="100" onchange="myFunctionRange(thisgithub.value);"/> <p id="demo"></p> <p>This is a very basic control for your OMNIBOT!</p> <script>var AudioContext = window.AudioContext || window.webkitAudioContext;context = new AudioContext;osc = context.createOscillator();osc.type=osc.SQUARE;osc.frequency.value = 440;// osc.start(0);var gainObj = context.createGain();gainObj.gain.value = 1;osc.connect(gainObj);gainObj.connect(context.destination); function myFunctionOff() { document.getElementById("demo").innerHTML = "OFF"; osc.stop(0);} function myFunctionOn(f) { document.getElementById("demo").innerHTML = "ON"; osc = context.createOscillator(); osc.type=osc.SQUARE; osc.connect(gainObj); osc.frequency.value = f; osc.start(0); } function myFunctionRange(f) { document.getElementById("demo").innerHTML = f; osc = context.createOscillator(); osc.type=osc.SQUARE; osc.connect(gainObj); osc.frequency.value = f; osc.start(0); } </script> </body><com/html>  <hackffm/pre>OminibotWebRemote
913
Bearbeitungen