-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from debsahu/develop
1.2.1
- Loading branch information
Showing
8 changed files
with
594 additions
and
125 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"ct":256, | ||
"mode": "unicast", | ||
"su":1, | ||
"uct":7 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' /> | ||
<meta name='viewport' content='width=device-width' /> | ||
<script> | ||
function LoadBody() { | ||
//var url = '/data/data.json'; | ||
var url = '/data'; | ||
fetch(url, { | ||
method: 'GET' | ||
}).then(function(e) { | ||
if(e.ok){ | ||
return e.json(); | ||
} | ||
throw new Error('Network response was not ok.'); | ||
}).then(function (e) { | ||
console.log('Success:', JSON.stringify(e)); | ||
document.getElementById("pixelct").innerHTML = 170 * (e.uct - e.su + 1); | ||
document.getElementById("mode").value = e.mode; | ||
document.getElementById("su").value = e.su; | ||
document.getElementById("uct").value = e.uct; | ||
}).catch(function(e) { | ||
console.error('Error:', e) | ||
}); | ||
} | ||
function validateVal() { | ||
var suval = document.getElementById("su").value; | ||
var uctval = document.getElementById("uct").value; | ||
var maxUniverse = 170 * 7; | ||
if(document.frmmr.mode.value == "unicast") maxUniverse = 170 * 12; | ||
if( suval > uctval || (uctval - suval + 1) <= 0 || 170 * (uctval - suval + 1) > maxUniverse) { | ||
if(suval > uctval) alert("Starting universe cant be higher than ending universe!"); | ||
if(uctval - suval + 1 <= 0) alert("Number of Pixels cant be negative/zero!"); | ||
if(170 * (uctval - suval + 1) > maxUniverse) alert("Cant access that many universes!"); | ||
return false; | ||
} else { | ||
return true; | ||
} | ||
} | ||
function calcPixels() { | ||
document.getElementById("pixelct").innerHTML = 170 * (document.getElementById("uct").value - document.getElementById("su").value + 1); | ||
} | ||
function checkUnicast() { | ||
if(document.frmmr.mode.value == "unicast") { | ||
document.getElementById("su").max = "12"; | ||
document.getElementById("uct").max = "12"; | ||
} else { | ||
document.getElementById("su").max = "7"; | ||
document.getElementById("uct").max = "7"; | ||
} | ||
} | ||
</script> | ||
<style> | ||
body { | ||
width: 100%; | ||
height: 100%; | ||
margin: auto; | ||
text-align: center; | ||
background-color: #c6b3d4; | ||
font-family: sans-serif; | ||
color: white; | ||
-webkit-box-sizing: border-box; | ||
-moz-box-sizing: border-box; | ||
box-sizing: border-box; | ||
} | ||
|
||
#wrapper { | ||
width: 250px; | ||
height: 270px; | ||
border: 2px solid #8531C6; | ||
border-radius: 8px; | ||
margin: auto; | ||
margin-top: 25px; | ||
background-color: #580797; | ||
} | ||
|
||
.subbt { | ||
text-align: center; | ||
margin: 20px; | ||
background-color: #008CBA; | ||
border: none; | ||
color: white; | ||
padding: 10px 30px; | ||
text-decoration: none; | ||
display: inline-block; | ||
font-size: 20px; | ||
border-radius: 8px; | ||
} | ||
|
||
.title { | ||
line-height: 24px; | ||
display: block; | ||
padding: 2px 0; | ||
color: white; | ||
} | ||
|
||
.form { | ||
width: 100%; | ||
padding: 10px; | ||
margin: 8px 0; | ||
box-sizing: border-box; | ||
} | ||
|
||
a { | ||
color: white; | ||
text-decoration: none; | ||
} | ||
|
||
.github{ | ||
margin-top: 10px; | ||
} | ||
|
||
.github a { | ||
color: #EF5989; | ||
text-decoration: none; | ||
font-weight: bold; | ||
font-size: 16px; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body onload="LoadBody()"> | ||
<div id="wrapper"> | ||
<h4 class="title">E1.31 Pixel Pusher</h4> | ||
<form name="frmmr" class="form" method='POST' action='/updateparams' onsubmit="return validateVal()"> | ||
Pixels: <span id="pixelct"></span> | ||
<br> | ||
Mode: | ||
<select id="mode" name="mode" onblur="checkUnicast()"> | ||
<option value="unicast">UNICAST</option> | ||
<option value="multicast" selected>MULTICAST</option> | ||
</select> | ||
<br> | ||
Start Universe: <input id="su" name="su" type="number" placeholder="Starting universe" max="12" min="1" onkeyup="this.value=this.value.replace(/[^\d]/,'')" onblur="calcPixels()" onclick="calcPixels()"/> | ||
<br> | ||
End Universe : <input id="uct" name="uct" type="number" placeholder="Ending universe" max="12" min="1" onkeyup="this.value=this.value.replace(/[^\d]/,'')" onblur="calcPixels()" onclick="calcPixels()"/> | ||
<br> | ||
<input class="subbt" type="submit" value="Update"> | ||
</form> | ||
</div> | ||
<br><a href='/update'>Update Firmware?</a> | ||
<br> | ||
<div class="github"><a href='https://github.com/debsahu/E131_PixelPusher'>E131_PixelPusher by @debsahu</a></div> | ||
<script> | ||
</script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<!DOCTYPE html><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width"><script>function LoadBody(){var e="/data";fetch(e,{method:"GET"}).then(function(e){if(e.ok)return e.json();throw new Error("Network response was not ok.")}).then(function(e){console.log("Success:",JSON.stringify(e)),document.getElementById("pixelct").innerHTML=170*(e.uct-e.su+1),document.getElementById("mode").value=e.mode,document.getElementById("su").value=e.su,document.getElementById("uct").value=e.uct}).catch(function(e){console.error("Error:",e)})}function validateVal(){var e=document.getElementById("su").value,t=document.getElementById("uct").value,n=1190;return"unicast"==document.frmmr.mode.value&&(n=2040),!(e>t||t-e+1<=0||170*(t-e+1)>n)||(e>t&&alert("Starting universe cant be higher than ending universe!"),t-e+1<=0&&alert("Number of Pixels cant be negative/zero!"),170*(t-e+1)>n&&alert("Cant access that many universes!"),!1)}function calcPixels(){document.getElementById("pixelct").innerHTML=170*(document.getElementById("uct").value-document.getElementById("su").value+1)}function checkUnicast(){"unicast"==document.frmmr.mode.value?(document.getElementById("su").max="12",document.getElementById("uct").max="12"):(document.getElementById("su").max="7",document.getElementById("uct").max="7")}</script><style>.subbt,body{text-align:center;color:#fff}.subbt,.title,a,body{color:#fff}.github a,.subbt,a{text-decoration:none}body{width:100%;height:100%;margin:auto;background-color:#c6b3d4;font-family:sans-serif;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#wrapper{width:250px;height:270px;border:2px solid #8531C6;border-radius:8px;margin:25px auto auto;background-color:#580797}.subbt{margin:20px;background-color:#008CBA;border:none;padding:10px 30px;display:inline-block;font-size:20px;border-radius:8px}.title{line-height:24px;display:block;padding:2px 0}.form{width:100%;padding:10px;margin:8px 0;box-sizing:border-box}.github{margin-top:10px}.github a{color:#EF5989;font-weight:700;font-size:16px}</style></head><body onload="LoadBody()"><div id="wrapper"><h4 class="title">E1.31 Pixel Pusher</h4><form name="frmmr" class="form" method="POST" action="/updateparams" onsubmit="return validateVal()">Pixels: <span id="pixelct"></span><br>Mode:<select id="mode" name="mode" onblur="checkUnicast()"><option value="unicast">UNICAST</option><option value="multicast" selected>MULTICAST</option></select><br>Start Universe: <input id="su" name="su" type="number" placeholder="Starting universe" max="12" min="1" onkeyup="this.value=this.value.replace(/[^\d]/,"")" onblur="calcPixels()" onclick="calcPixels()"><br>End Universe : <input id="uct" name="uct" type="number" placeholder="Ending universe" max="12" min="1" onkeyup="this.value=this.value.replace(/[^\d]/,"")" onblur="calcPixels()" onclick="calcPixels()"><br><input class="subbt" type="submit" value="Update"></form></div><br><a href="/update">Update Firmware?</a><br><div class="github"><a href="https://github.com/debsahu/E131_PixelPusher">E131_PixelPusher by @debsahu</a></div><script></script></body></html> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,31 @@ | ||
[platformio] | ||
src_dir = ./Arduino/E131_PixelPusher/ | ||
;env_default = nodemcuv2 | ||
;env_default = esp32dev | ||
;default_envs = nodemcuv2 | ||
;default_envs = esp32dev | ||
|
||
[common] | ||
framework = arduino | ||
build_flags = | ||
-w | ||
monitor_speed = 115200 | ||
; upload_speed = 921600 | ||
upload_speed_fast = 921600 | ||
upload_speed = 115200 | ||
lib_deps = | ||
ESPAsyncE131=https://github.com/forkineye/ESPAsyncE131 | ||
NeoPixelBus | ||
[email protected] | ||
; NeoPixelBus=https://github.com/Makuna/NeoPixelBus/archive/Esp32RMTExperimental.zip | ||
ESP Async WebServer | ||
ESPAsyncWiFiManager | ||
https://github.com/debsahu/Adafruit_DotStar | ||
|
||
[common:esp8266] | ||
platform = [email protected] | ||
arduino_core_2_3_0 = [email protected] | ||
arduino_core_2_4_0 = [email protected] | ||
arduino_core_2_4_1 = [email protected] | ||
arduino_core_2_4_2 = [email protected] | ||
arduino_core_2_5_2 = [email protected] | ||
arduino_core_stage = https://github.com/platformio/platform-espressif8266.git#feature/stage | ||
platform = ${common:esp8266.arduino_core_2_5_2} | ||
board_build.flash_mode = dout | ||
upload_resetmethod = nodemcu | ||
build_flags = | ||
|
@@ -31,9 +39,9 @@ lib_deps = | |
ESPAsyncDNSServer | ||
|
||
[common:esp32] | ||
platform = [email protected] | ||
platform = [email protected] | ||
;platform = https://github.com/platformio/platform-espressif32.git#feature/stage | ||
build_flags = | ||
-D PIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH | ||
-D ARDUINO_ARCH_ESP32 | ||
lib_ignore = | ||
ESPAsyncUDP | ||
|
@@ -46,8 +54,7 @@ lib_deps = | |
[env:nodemcuv2] | ||
board = nodemcuv2 | ||
framework = ${common.framework} | ||
; platform = ${common:esp8266.platform} | ||
platform = https://github.com/platformio/platform-espressif8266.git#feature/stage | ||
platform = ${common:esp8266.platform} | ||
build_flags = | ||
${common.build_flags} | ||
${common:esp8266.build_flags} | ||
|
@@ -59,16 +66,15 @@ board_build.flash_mode = ${common:esp8266.board_build.flash_mode} | |
lib_deps = | ||
${common.lib_deps} | ||
${common:esp8266.lib_deps} | ||
;targets = upload, monitor ;uncomment for upload and serial monitor | ||
;targets = erase, upload, monitor ;uncomment for upload and serial monitor | ||
|
||
# see: http://docs.platformio.org/en/latest/platforms/espressif32.html | ||
[env:esp32dev] | ||
board = esp32dev | ||
board = lolin_d32 | ||
framework = ${common.framework} | ||
platform = ${common:esp32.platform} | ||
;platform = https://github.com/platformio/platform-espressif32.git#feature/stage | ||
monitor_speed = ${common.monitor_speed} | ||
upload_speed = ${common.upload_speed} | ||
upload_speed = ${common.upload_speed_fast} | ||
build_flags = | ||
${common.build_flags} | ||
${common:esp32.build_flags} | ||
|
@@ -77,4 +83,5 @@ lib_ignore = | |
lib_deps = | ||
${common.lib_deps} | ||
${common:esp32.lib_deps} | ||
;targets = upload, monitor ;uncomment for upload and serial monitor | ||
; WiFiManager=https://github.com/tzapu/WiFiManager/archive/development.zip | ||
;targets = erase, upload, monitor ;uncomment for upload and serial monitor |