-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheeprom.html
57 lines (42 loc) · 2.2 KB
/
eeprom.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<!DOCTYPE html>
<html lang="en">
<title>Hex2WavJS - Set EEPROM</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="tachyons.min.css">
<body class="black washed-red Helvetica bg-light-yellow">
<header class="bg-hot-pink w-100 pv3-l pv3 pv2-ns ph3-m ph3-l">
<nav class="f6 fw6 ttu ">
<span class="link yellow dib mr3">Hex2wavJS</span>
<a class="link dim white dib mr3" href="index.html" title="Home">Upload Hex</a>
<a class="link dim white dib mr3" href="eeprom.html" title="About">Set EEPROM</a>
<a class="link dim white dib mr3" href="control.html" title="Store">Control Signal</a>
<a class="link dim white dib mr3" href="sequencer.html" title="Store">Sequencer</a>
</nav>
</header>
<section class="center w-80 pa2 pa2-ns bt b--black-10 black-70">
<h1 class="lh-title">Hex2WavJS - Set EEPROM</h1>
<div class="pv2">
Send EEPROM variable (8 bit) array size up to 64, see js source code, and <a href="https://github.com/8BitMixtape/_8Bit-Mixtape-NEO-Lib/commit/548cadc193fa8b50dd3eb4ead7e13e9b58d7993c#diff-ef91a8dbadc41415b056becebc29d0c7">arduino code example</a>
<br/>var1: <input class="input-reset ba b--black-20 pa2 mb2 db w-100" type="number" min="0" max="255" value="0" step="1" name="eepromVar1" id="eepromVar1">
<button class="b ph3 pv2 input-reset ba b--black dim bg-transparent pointer f6 dib" type="button" id="sendEEPROM">Send EEPROM Signal</button>
</div>
</section>
<script src="js/hex2wav.js"></script>
<script>
window.addEventListener('load', init, false);
function init() {
var hex2wav = new Hex2wav();
var sendToEEPROM = function (arr)
{
var signal = hex2wav.generateEEPROMSignal(arr);
hex2wav.playSignal(hex2wav.audioCtx, signal);
}
document.querySelector('#sendEEPROM').onclick = function () {
var var1 = parseInt(document.querySelector('#eepromVar1').value);
console.log(var1);
sendToEEPROM([var1]);
}
}
</script>
</body>
</html>