4refr0nt / esplorer Goto Github PK
View Code? Open in Web Editor NEWIntegrated Development Environment (IDE) for ESP8266 developers
Home Page: http://esp8266.ru/esplorer/
License: GNU General Public License v2.0
Integrated Development Environment (IDE) for ESP8266 developers
Home Page: http://esp8266.ru/esplorer/
License: GNU General Public License v2.0
It would be really convenient if there was a dialogue button dedicated to hardware reset to Lua prompt based on the common scheme of a init.lua that bales out on gpio.read(3) == 0.
The button would assert RTS for say 500ms, release it and say 200ms later assert DTR for 5000ms and release it.
This is equivalent to pushing the /RST and FL buttons on the board, but they might be be readily accessible.
I note that this reset scheme does not work as commonly wired in articles on the net, but connecting a diode cathode to GPIO16 and anode to /RST does work on the dev kit boards I have on hand. (Detailed explanation at http://owenduffy.net/blog/?p=10024 .
Owen
History:
Up to rc2 it was possible to resize the FileManager panel with the files shown in multiple columns when the manager width is increased.
Problem:
After rc2 up to latest rc, the files shown only show in a single column and it is impossible to see all the files on the ESP.
Suggested fix:
Change the FileManager control to be similar as in rc2.
Add a scroll bar to the panel to scroll down to be able to reach all the files on the ESP
If I use block comments in my code, I get interpreter errors saying nesting of [[..]] is deprecated
.
Resultant file on ESP has all lines uncommented, which is wrong.
e.g.
print("this should print")
--[[
print("this should NOT print")
print("even this should not, since it is block comment")
--]]
print("this should also print")
Above code prints all the lines.
Hello,
Can you please add in File Manager Panel, one scroll box with buttons (up and down) to be possible to open all files in list ?
Regards,
VS
I am new to programming esp's
When i send my micropython code to the ESP (ESP-01) i see that he is sending each line like this:
f = open('main.py', 'w')
f.write('import fancyStuff')
f.write('do fancyStuff')
f.close();
This result in a oneliner because there is no \n at the end of each line.
When i execute print([x for x in open('main.py').readlines()])
i get this: ['import fancyStuffdo fancyStuff']
Do i have to put a "\n" in each line of my sourcecode to get newlines on my esp?
After updating to RC5 the connection no longer gives connecting dots and I get a time out waiting answer from ESP. I have to send node.heap() to get a response.
Linux 64 os.
Communication with MCU...
Got answer! AutoDetect firmware...
Can't autodetect firmware, because proper answer not received.
I can't understand this. With latest NodeMCU firmware (nodemcu_float_0.9.6-dev_20150704.bin), the answer to "CR/LF" is "CR/LF/> ". Which is detected by code "if (data.contains("\r\n>")) {". But I can't find where "CR/LF" is sent to the NodeMCU... Any idea to improve ?
I have great request to make:
because of my visual impairment (not so uncommon at my age) it is very hard to me to use ESPlorer with available skins because they are all dark themes (light text on dark/black background). Also current GUI colours (black on grey) are very hard (almost harder)on my eyes. Because of that I'd really to request that you provide at list one light coloured skin (i.e. dark text on white background). I'd request white background for the GUI as well if that is not overly difficult.
If that means too much effort for you - is it possible that I do it myself somehow?? Of course I'd need some instructions how to go about it.
IDE doesn't write LUA file lines to memory
for some reason it uses (file.writeline) command instead of (file.write)
Example:
file.remove("test.lua");
file.open("test.lua","w+");
w = file.writeline
w([==[print("Test")]==]);
file.close();
dofile("test.lua");
stdin:1: attempt to call field 'writelinew' (a nil value)
stack traceback:
stdin:1: in main chunk
I'm using ESP-01 modules with an USB-CH340 adapter; since v0.2.0-rc5 (binary downloaded as v0.2.0-rc6 from your site, but title bar and About dialog names it v0.2.0-rc5) the autodetection of the AT firmware of my ESP-01 modules does no longer work; when I switch back to v0.2.0-rc3 then my modules are properly detected again; modules have:
AT version:0.40.0.0(Aug 8 2015 14:45:58)
AT version:0.60.0.0(Jan 29 2016 15:10:17)
Search and replace dialog in code editor.
Add saveas to files, so you can save an file and keep track of versions.
Add a button (Send as init.lua) so that you can send files to the esp and rename them as init.lua
Flashing newest firmware is done well using command "sudo python esptool.py --port /dev/ttyUSB0 write_flash 0x00000 ./nodemcu_latest.bin"
after that, i launch ESPlorer using command "sudo ./ESPlorer.jar"
it founds port /dev/ttyUSB0 successfully, but when it tries to comunicate ("open" button) no response is comming from node mcu, please help ...
clicking links >> Download latest firmware takes me to this 404 page
https://github.com/nodemcu/nodemcu-firmware/blob/master/pre_build/latest/nodemcu_latest.bin?raw=true
Its really confusing newbie's like me, can someone fix this
I really don't know what is happening, but when I send or save to nodemcu, lua code, most of the times it can't send and throw stdin errors and in the console I see that what is being sent contains garbage characters and that's why it is breaking. Any ideas on how to fix this?
Example: Sending print("Hello World") -> print(""#$...") and other garbage.
I'm using ESPlorer on a Mac running El Capitan. While I can use all shortkeys like cmd+A, cmd+C, cmd+V inside the code editor as usual, the command line input field does react only on combinations of ctrl+A, ctrl+C, ctrl+V ignoring the native key combinations.
file.remove("test.lua");
file.open("test.lua","w+");
w = file.writeline
w([==[str = "Hello World!";]==]);
w([==[print(str);]==]);
file.close();
dofile("test.lua");
stdin:1: attempt to call field 'writelinew' (a nil value)
stack traceback:
stdin:1: in main chunk
Each time I hit "Save to ESP" the console returns something similar to this. Just seems like something has been lost. However "Send to ESP" works. No use changing baud rate.
Could you please describe how to build ESPlorer from source?
hi, I can't seem to figure out how to send a ctrl-c to terminate a running process, how can I do this?
Today... when i have installed the JDK 9.0 ESplorer crash everytime ....
http://esp8266.ru/ESPlorer is offline
BTW: Have you ever thought about wireless development?
LUA has telnet capabilities (https://github.com/nodemcu/nodemcu-firmware/blob/master/examples/telnet.lua). The IDE would significantly benefit from supporting this as an alternative to serial.
Think about it,
Juergen
When a Python file is sent to ESP Flash, the line feeds are getting removed. This results in an invalid python file.
The file uploaded via Esplorer looks like
['def main(): print ("Hello Main2")print('Hello Main 1')main()']
The same file uploaded via WebRepl looks like
['def main():\n', ' print ("Hello Main2")\n', '\n', "print('Hello Main 1')\n", 'main()']
As you can see the "\n" chars are getting removed when sending via esplorer.
Sample python code in main.py
def main():
print ("Hello Main2")
print('Hello Main 1')
main()
I use this script:
print("test 3")
leads to:
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 0
at ESPlorer.ESPlorer.FileCompileDoLCActionPerformed(ESPlorer.java:7820)
at ESPlorer.ESPlorer.access$6200(ESPlorer.java:38)
at ESPlorer.ESPlorer$60.actionPerformed(ESPlorer.java:1295)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6516)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3320)
at java.awt.Component.processEvent(Component.java:6281)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4872)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:708)
at java.awt.EventQueue$4.run(EventQueue.java:706)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
I'm having a bit of trouble getting ESPlorer to autodetect my NodeMCU firmware, what is the expected handshake? It seems to be a caret distance of more than 10? The thing is, this only seems to happen when the device is restarted, not when opening the port. So when opening the port it just hangs unless resetted. Unless autodetect is disabled, then it works fine. I'm a bit new, in earlier versions upon opening the port it printed out the firmware version?
This seems to be the section responsible for autodetecting the firmware:
public void CheckComm() {
if (!AutodetectFirmware.isSelected()) {
portJustOpen = false;
return;
}
portJustOpen = true;
TerminalAdd("\r\nCommunication with MCU..");
checker = new ActionListener() {
public void actionPerformed(ActionEvent evt) {
if (portJustOpen) {
btnSend(""); // only CR+LF
TerminalAdd(".");
if (Terminal.getCaretOffsetFromLineStart() >= 10) {
TerminalAdd("\r\n");
}
} else {
try {
openTimeout.stop();
} catch (Exception e) {
log(e.toString());
}
}
}
};
openTimeout = new Timer(3000, watchDog);
openTimeout.setRepeats(false);
openTimeout.setInitialDelay(3000);
openTimeout.start();
}
This is the 'error' message I'm getting:
PORT OPEN 115200
Communication with MCU..<this is the point I've resetted!>Got answer! Communication with MCU established.
AutoDetect firmware...
Can't autodetect firmware, because proper answer not received (may be unknown firmware).
Please, reset module or continue.
lnn���b�p�lrlrlp�n����lbn�|��l�|��b��nn�l��l`����nnl`���nr���nr��`�p�n���r�����bn�|����b��nn�l`����nnl�l`���nr���n�bl`�`�n��b�nl���nn���lp�n���r�����l�bn�|�b��nn�l�l`����nnl`���nr���n����l�r��n����l������n��r��n|�llll`���r�l�l���
NodeMCU 1.5.4.1 build unspecified powered by Lua 5.1.4 on SDK 1.5.4.1(39cb9a32)
lua: cannot open init.lua - See more at: http://www.esp8266.com/viewtopic.php?f=23&t=13378#sthash.kMMJglx5.dpuf
So I've resetted the device, otherwise it would hang on the ..
Problem: The editor uploads items too fast, setting dummy mode to delay of 100ms solves, opening options and closeing options causes this value to reset.
Solution: make delay of 100ms default.
Problem: Characters in string are taken as literals.
Solution: change pyfiller.java->escape to
`
public String escape(String str) {
char ch;
StringBuilder buf = new StringBuilder(str.length() * 2);
int intValue;
for (int i = 0, l = str.length(); i < l; ++i) {
ch = str.charAt(i);
if (ch == '"') {
//intValue = ch;
buf.append("\\");
//buf.append(ch);
buf.append(ch);
} else if (ch == '\'') {
intValue = ch;
buf.append("\\");
//buf.append(intValue);
} else {
buf.append(ch);
}
else if(ch == '\\')
{
buf.append("\\\\");
}
else
{
buf.append(ch);
}
}
return buf.toString();
} // escape`
Problem: file writing adds it all as a single line.
Solution: Change line 32 of Pifiller to: sendBuf.add("f.write('" + escape(subs) + "\\n')");
Hi
where setup wifi ssid & pass for "wifi conn" button
Thank You
View
-> Terminal font size inc/dec
and Change font size from x to y
in terminal's popup menu does not work;
View
-> Editor font size inc/dec
and Inc/Dec font size
in editor's popup menu does not change the editor font size, but changes the terminal font size instead.
Could you build the .jar file for the new beta or give me a short instruction how I can do it on my own?
Thank You!
more info - micropython/micropython#2085
It's pretty easy. Plus it negates the need for a folder since everything is contained.
In MicroPython mode, Send settings does not stick, and gets reset to "Dumb Mode" with 0ms line delay.
This happens uppon hovering the "Select firmware -> MicroPython" checkbox/text, and after saving a file.
If I change the setting, and make sure not to hover "MicroPython" when changing to the scripts tab, I am able to upload a file, before the settings are reset and I have to change them again.
Could be related to #41, and magic happening there.
You can also clearly see #48 happening here, when hovering the Cancel button.
Version in use is trunk, with some minor adjustments to the way file writes are encoded 80893ea
Compiled with NetBeans on Archlinux, and ran on Windows 10.
Would be great to also have an input field + button for sending a ping on the AT station tab.
When using the right click menu on the lua file in the esp8266 the system hangs and does not create a new script or a save file window.
When connecting an esp8266 with API 2.0 or lower this functionality works correctly.
My simple test program in Lua:
-------begin---------------
print('tobytest.lua ver 1.0')
wifi.setmode(wifi.STATION)
-------end-------------------
Termial window displays somthing like following:
--------begin---------------------------------------
file.remove("tobytest.lua");
file.open("tobytest.lua","w+");
w = file.writeline;
w([==[pr>> int('tobytest.lua ver 1.0')]==]);
w([==[wifi.setmode(wifi.STATION)]==]);
file.flush();file.close();
dofile("tobytest.lua");
tobytest.lua:2: '=' expected near 'int'
stack traceback:
[C]: in function 'dofile'
stdin:1: in main chunk
--------end-------------------------------------------
More information of the problem:
in ESPlorer.java line 12994
------- original code ---------------
delay = LineDelay.getValue();
------- original code end ----------
I found delay is 0 after this line.
If I increases delay, the problem will lessen, but won't solved . (Still similar error if the program saving has a very long line.)
Hello,
I have these errors in netbeans:
cannot find symbol Terminal and SnippedText.
Any suggestion?
Thanks in advance
In a Chinese environment, the Ctrl
+ Space
hotkey is a global hotkey preserved for toggling the Chinese input method. Hence the autocomplete cannot be triggered when the default key combination is pressed.
I've been chasing sporadic timeouts when running ESPlorer 0.2.0-rc2 against the latest NodeMCU dev
branch builds. Even though #22 resolved the most obvious cases, there remain a few more. Specifically, actions which trigger single line commands can fail with timeout under the following conditions:
FileRemoveESP()
is called.file.remove()
and sleeps for ~200 ms.>
prompt when FileListReload.doClick()
is called.ListFiles()
sets up everything to list the files.PortFilesReader
. Since the received characters are not related to the intended command for listing the files, it will stop the timer for sending.WatchDog()
triggers after a couple of seconds.I'd guess that simple activities like file.remove() or node.compile() should have some code to wait and consume the resulting prompt. Just sleeping with the expectation that the prompt is received in time can cause such sporadic issues.
When issuing Save (both from Ctrl+S or button), an upload followed by dofile(FILE)
call is executed. There is acually no way to just upload a file (e.g. not a LUA file)
Hey Guys,
I don't know if this is already fixed but with v0.2.0-rc3 I experienced that some code was never called.
The reason is this:
-- Do XYZ
print("Do something")
Now this got into:
w([==[ -- Do XYZ ]==]); w([==[ print("Do something"....
So the goal would be to regexp something like /--(.*)/
to /--[[ (.*) --]]/
, so that we can fully flash the correct code (Or maybe even escape the --'s when one really wants the same code on the device)
Hello,
it must be easy to be done, if someone have time and desire,
I usually have around 30 files on my ESP and file managerpanel show only 10 of them. If it was made scroll able will be awesome.
There is no way to uncheck "AutoRun file after save tor ESP" at settings tab.
Perhaps this is the reason for issue #17.
New menu option
File > Open recent from disk >
which displays a list of the 10 most recent files in last opened order. Click on list item to open file.
Hi,
I developed something similar, but stop the minute I saw this project! Really great work. HUGE thumbs up!
I've just to minor issues:
-On Mac or Linux the serial ports are named like this: /dev/tty.usbserial-A4001Ib9. This does not fit into the combobox and you have to sort of guess which one is the right.
-You could set a relative working directory or leave it blank. C:... does not exist on none-M$ machines.
Keep on developing.
Thanks
Juergen
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.