-
Does anybody know about this ?
https://github.com/aplikatika/Espruino-on-ESP8266 -
After connecting to a board, WebIDE trys to read process.env.
If you have, like me, problems with serial port in chrome, sometimes you will not get the data.
Usually I disconnect and reconnect until I get the all data for process.env
Board information is available in settings/about tab at the bottom. -
There was another option for async handling
BTW, @allObjects, you have a message ;-) -
-
Based on Gordons WebIDE I created one for ESP8266 with nodeMCU firmware, a LUA version for the ESP8266. The nodeMCU version is much easier to handle and to program compared to AT-based firmware. Anyway, once you started with LUA, you will love Espruino more than ever :-)
WebEditor is still under construction, actual version on github is here: https://github.com/jumjum123/ESP8266WebIDE
First introduction on youtube is this https://www.youtube.com/watch?v=6j8vAn_fZHU
-
My question is a little bit off topic :-),
how would I connect the BME280/680 to Espruino ? Is there a special adapter or a socket ? Having all fingers as thumbs, soldering would not be my preferred solution.
BTW, using an BME680 could be a solution to create longtime observation of rooms. Right now friends have the problem to follow some putrid smell in their appartment. This sensor could give some information about time and strength, which can be helpful to locate the source. -
During testing I found this option:
- add lines to app.js, just before setting data to api (at the end of function openPopup)
if(options.attachTo){
var loc = $(options.attachTo).offset();
$("#" + options.id).css({position:"absolute"}).offset({top:loc.top,left:loc.left});
} - add an attribute to object to call of openPopup
Espruino.Core.App.openPopup({
position: "relative",title:.....,attachTo:"#id of object where popup should be on screen"...})
- add lines to app.js, just before setting data to api (at the end of function openPopup)
-
-
Did you load the 8266 binary ?
http://www.espruino.com/binaries/espruino_1v73_espruino_1r3_esp8266.bin -
-
-
-
Hmm, I could imagine a displayType like "switchTesting", giving name of a testingFile.
This would stop actual polling, load and display new testingFile, create a new polling function on Espruino, and start polling again. I will check it.
Language for plugins is Javascript
BTW, would be nice to get some more information about your project. I was working in technical plants supporting DCS, where something similiar is often used. -
Testing plugin is designed as a simple GUI to support testing and quick&dirty presentations.
It supports a lot of functions, but it's not a full blown up GUI-Interface.
WebIDE would not be the right place for a sophisticated GUI, this should be done in a seperate application.Testing supports 2 main functions.
1. Display values from Espruino board
WebIDE defines a function on Espruino, which creates and sends an JSON-Object and calls this function. Incoming data is interpreted and displayed as circle(alarm, warning,status), bar(0-100) or text(string or integer).
2. Actions sent to Espruino board
Clicking on the image sends data to Espruino. This can be assigning a value(number, boolean, string) or a command(e.g. calling a function). Commands are designed for short snippets right now, this could possibly be changed(from textbox to textarea).Definition of display and actions is stored locally, in a subfolder of local project folder (see link to tours in project part of options). Format is JSON see example:
{ "imageUrl":"Alarming.jpg", "testMode":"Image", "dataPoints":[ {"label":"L07","expression":"a1","type":"number","points":[],"display":"A","x":"930","y":"300"}, {"label":"P13","expression":"a2 * 0.7","type":"number","points":[],"display":"A","x":"670","y":"290"}, {"label":"GeneralAlarm","expression":"as*2","type":"number","points":[],"display":"none","x":"0","y":"0"}, {"label":"F03","expression":"w1*0.5","type":"number","points":[],"display":"W","x":"45","y":"455"}, {"label":"T07","expression":"w2*0.3","type":"number","points":[],"display":"W","x":"170","y":"380"}, {"label":"GeneralWarning","expression":"ws*1.5","type":"number","points":[],"display":"none","x":"0","y":"0"}, {"label":"Motor","expression":"s1","type":"number","points":[],"display":"S","x":"170","y":"480"}, {"label":"Log","expression":"asyncLog","type":"text","points":[],"display":"T","x":525,"y":75}, {"label":"L09","expression":"process.memory().free / 30","type":"number","display":"B","x":"760","y":"790"} ], "actionPoints":[ {"label":"Alarm","expression":"testAlarm()","type":"command","x":"66","y":"30"}, {"label":"Warning","expression":"testWarning()","type":"command","x":"208","y":"30"}, {"label":"Status","expression":"testStatus()","type":"command","x":"337","y":"30"}, {"label":"Reset","expression":"resetAll();","type":"command","x":"0","y":"0"} ] }
-
I'm working on some new functions around testing plugin in WebIDE.
To get some feedback, I created a small video
on youtube.
Main change is the option to use images as background for testing.
Values from Espruino Board overlay this image, so you will see actual data.
-
To give some more information about my confusion.
I compared ChangeLog from (matches name of last commit in GitHub) during my search for binary matching last commit.
http://www.espruino.com/binaries/git/commits/430f7fff273db8a018d13004fe1051140cd0b4b8/
with ChangeLog of latest commit in GitHub
https://github.com/espruino/Espruino/commit/430f7fff273db8a018d13004fe1051140cd0b4b8
and it is different.
Searched around a bit and found this one:
https://github.com/espruino/Espruino/commit/59d7766576ae704c588e4bcd0bcca188bedde0c4
where ChangeLog fits to the one in binaries/git/...../430....0b4b8.Oh, just checked the textfile in /binaries/git/commit, written today, and it has text of ChangeLog from 16th.
There is something I cannot follow, change log from yesterday reflects status from 16th, all later changes cannot be found. What is the status of bin file from yesterday, is it from yesterday or from 16th ? -
-
-
@DrAzzy, thanks for the hint.
Should be working now, copied the file to my server.
Since my homepage is limited, I need to find a better location. -
My new project is an alarming unit for Espruino.
Testing function of WebIDE is used to visualize and control testing.
Attached is source of the project and testing file.Testing file works with project option. Copy testing file to sub folder testing in your local project folder. Project and testing needs to be activated in options. You will find links to tours for project and testing there too.
Some short explanation about alarms in processing units.
In technical plants you often have a board which reflects actual status of the unit. Usually there are meters and lot of lamps. These lamps can be grouped to- alarm, something bad happened like temperatur too high
- warning, somebody should take a look like flow is below 35%
- status, pump is running
Usually alarms are blinking(red) and stay blinking until pushing reset.
Warnings do the same but have a different reset button.
After reset alarm- and warning-lamps are on, until alarm or warning is off.
Status lamps only show actual status and are on or off.
Common question is "which alarm came first". Imagine having a water pump.
This pump should not run dry, to avoid damages. And pump should not be too hot for same reason. Therefore pump shuts off if temp is too high or no flow is detected.
This happens very fast, and you would see 3 alarms, Temp too high, no Flow and Pump off. All are comin in at same time, at least for your eyes.
For root cause analysis you would need to know the sequence of alarms.
All of this is available in attached source. There are some more explanations in source.
During testing I found a bug in WebIDE(sorry, my fault), its already fixed in Github by Gordon. For now you need to use actual version from github until next rollout which may also have 1st version of compiling in, hopefully ...
- alarm, something bad happened like temperatur too high
-
-
-
Just updated to actual firmware and got problems (function undefined)
I'm pretty sure it worked fine with older version of firmware.
After changing sequence it worked fine as before