How to upload JavaScript modules/files to ESP #5272
Replies: 1 comment
-
Posted at 2016-04-27 by DrAzzy Once you've flashed Espruino, you don't need to put anything in as a file. Connect to the board using the Espruino Web IDE (see note below), and put your code in the right-hand side of the window. You can require() the modules by name (if they're on the official Espruino site) or you can enter a URL to point to a version hosted somewhere else, or you can set up the sandbox option to load modules from your computer instead of fetching them from the web. In any event, when you click the send to Espruino button, the IDE will grab the appropriate modules and send them to the Espruino (using Modules.addCached() ), minify your code (configurable in settings) and send that to the Espruino as well. If you click the left hand side and press the up arrow after uploading, you can see the commands it sent. (connecting with IDE) this can be done over serial - though you have to change the serial speed - or over telnet. See http://www.espruino.com/EspruinoESP8266 for info on how to set this up; I usually log in over serial after flashing using a non-Espruino terminal, set it up to use my wifi, and then connect only via telnet. Posted at 2016-04-28 by user64299 Thanks for tips. I launched Web IDE (Chrome), could connect to the device over serial port. Also send Code was succeeded after few failed attempts ("got errors like prompt not found"). I was not able to type in the terminal on the left side, also I could not see my console.log statement outputs over serial port. Instead I connected to 'Flash'n'Chips' from smart.js, I could write statements like setInterval(function(){console.log("Hello");}, 1000) could print "Hello" for every second, I could see over terminal. Can I type code in command prompt/console shown left side of the IDE? To me, typing is not working on command prompt, also console.log on the device is not printed. Disconnected
Another newbie question, to connect over ssh, how do I know the IP address of the ESP module running Espruino? Posted at 2016-04-28 by @gfwilliams You probably have the wrong baud rate? you need 115200. Posted at 2016-04-28 by user64299 @gfwilliams, You are right, I had bad baudrate, Thanks a lot saving me. Little more information.
I am trying to store angular.js within ESPruino, run simple REST service along with static index.html file, angular.js files on ESPruino, to run a simple web server with REST background. I learned that all the required modules are automatically uploaded to ESPruino after minimizing it, but not sure how to store and serve files externally. Posted at 2016-04-28 by user64299 After going through samples, I found that ESPRuino needs SD card to store the files. I remember either with smart.js or NodeMCU Lua firmware, I was able to have file, that can be listed, including init.lua without SD card. Any pointer to store files without SD card would be great, I have no experience in hardware to connect SD card. Posted at 2016-04-29 by @gfwilliams You can use http://www.espruino.com/FlashEEPROM, or as is done in pretty much all the examples you can use http://www.espruino.com/File+Converter to convert files into strings that you include in your code. But it's worth browsing the forum as there are a few other posts where people have stored files and things in flash in other ways. Also, it is just Posted at 2016-04-29 by DrAzzy What better to call an ESP8266 running Espruino, but ESPruino? Posted at 2016-04-29 by Wilberforce ESPruino8266? Posted at 2016-04-29 by @allObjects ...an new trademark to grab / register: ESPruino8266™ / ESPruino8266®... ;-| Posted at 2016-04-30 by Wilberforce Well the new kid on the block will be the esp32 - the dual core version of the esp8266 with more ram and Bluetooth and wifi... So: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2016-04-27 by user64299
I am using NodeMCU with ESPruino, I could blink few LEDs successfully, but really facing tough time with ESPruino, without much document on JS on NodeMCUs.
I don't know how to upload files like DHT11.js to NodeMCU, can you please give some pointers and tutorials on ESPruino with NodeMCU? I tries google a lot, able to upload the firmware, blink LEd, looking forward to use file uploads. I tries uploading files on Lua Firmware, it was working, also tried with Smart.js, I could make file upload possible with their GUI tool.
Please help me with useful resources on ESPruino and JavaScript on NodeMCU.
Beta Was this translation helpful? Give feedback.
All reactions