Skip to content

Commit

Permalink
Add decoding of 3 data items from connected device for local display …
Browse files Browse the repository at this point in the history
…with settings for data extraction / conversion (based on sscanf), slope / offset and name.

Add SPIFFs file system support for user update of web pages
Add NeoPixel support
Start on simple IO command evaluator
Add configurable connected device baud rate
Use EEPROM.put to save config data
Start on ePaper display support
Tried to improve selection of TFT display
  • Loading branch information
JamesNewton committed May 22, 2018
1 parent 0c9f15d commit ef2faaa
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 2 deletions.
47 changes: 47 additions & 0 deletions data/index.htm
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!doctype html>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script src="microajax.js"></script>
<html>
<head>
<title>ESP8266 IOT Serial to Web</title>
<style>
body { background-color: #cccccc; font-family: Arial, Helvetica, Sans-Serif; Color: #000088; }
</style>
<meta charset="utf-8" />
</head>
<body>
<pre><div id='log'></div></pre>
<p>
<form id='msg' action='data' method='get'>
<input id='txt' name='text' type='text'></input><input id='crlf' type='checkbox' checked>+cr?</input>
</form></p>
<p><a href="/admin.html">Settings</a> <!-- <a href="/file?start=1">Stream</a> --> </p>
<script type='text/javascript' src='/jquery-3.3.1.min.js'></script>

<script type='text/javascript'>
$('#msg').submit(function(){
var clientmsg = $('#txt').val();
if ($('#crlf').is(':checked')) clientmsg+='\r';
var log=$('#log');
log.html(log.html()+'<b>'+clientmsg+'</b>');
$.get('data', {text: clientmsg}, function(html){
log.html(log.html()+html);
});
$('#txt').attr('value', '');
loadLog(); //instantly pick up any response.
return false;
});
function loadLog(){
var log=$('#log');
$.ajax({
url: 'data',
cache: false,
success: function(html){
log.html(log.html()+html);
},
});
};
setInterval (loadLog, 2500);
</script>
</body>
</html>
2 changes: 2 additions & 0 deletions data/jquery-3.3.1.min.js

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions esp8266WebSerial.ino
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,11 @@ No workee... you also have to set it in the TFT_eSPI user_setup_select.h file
*/
//#define TFT_ADAFRUIT_2088 //original 128x128
//#define TFT_ADAFRUIT_358 //new 128x160
#define TFT_ILI9341
#define PIXELS 26
//#define TFT_ILI9341
#define EPAPER 1.5

//to drive NeoPixels, SK6812, WS2811, WS2812 and WS2813 with hex P command.
//#define PIXELS 26
#define DEBUGGING


Expand Down

0 comments on commit ef2faaa

Please sign in to comment.