JavaScript on ESP32 - Duktape
Re: JavaScript on ESP32 - Duktape
After several sleepless nights, (just kidding), I downloaded all today.
esp-idf, xtensa-esp32-elf, template and duktape-esp32.
Without running duktape-install and duktape-configure, I just compile, did a flash_erase and flash and are now up running again.
Now on to some test again.
Thank you.
esp-idf, xtensa-esp32-elf, template and duktape-esp32.
Without running duktape-install and duktape-configure, I just compile, did a flash_erase and flash and are now up running again.
Now on to some test again.
Thank you.
Yes Frida is my watchdog!
Re: JavaScript on ESP32 - Duktape
A little error in "test_i2c_1.js"
line 21,22
changed to
then I found my sensor.
Have a nice evening
line 21,22
Code: Select all
port1.beginTransmission(i);
var rc = port1.endTransmission();
Code: Select all
port1.beginTransaction(i);
var rc = port1.endTransaction();
Have a nice evening
Yes Frida is my watchdog!
Re: JavaScript on ESP32 - Duktape
Thank you sir, code change in the source will be in the next update. The cause of this issue is an interesting one ... initially I coded the I2C language as being sent in blocks of "transmissions" and then as I studied more, I found they were more commonly called "transactions" so changed the API but failed to work back through the tests. So the issue was one of governance. However, this brings up a broader consideration. Right now the number of ESP32-Duktape users that I know off can be counted on one hand so changes and decisions can be made without too much impact. However, not forgetting that this is a 100% open source project, I feel bad making unilateral decisions that would affect negatively scripts and code good folks like yourselves have already written. One solution would be to release nothing until everything was polished ... but I'm not a fan of that ... especially if we devote tons and tons of time to the project only to find that there is no interest. Another solution is to just have "faith" that we are all making changes based on sound reasons and accommodate the breakages. However, I for one am very open to community decision making ... if we (the community) wish to have alternative governance mechanisms for a project such as this, then we can make that happen.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
-
- Posts: 263
- Joined: Sun Jun 19, 2016 12:00 am
Re: JavaScript on ESP32 - Duktape
Quite an interesting project! I noticed Bluetooth taking 64K too, and it seems like a lot at least for BLE. Maybe Espressif can say something if this is going to remain that high?
If I may add my 5 cents regarding governance: its a bit too early to worry about that, just "move fast and break things". You'll want tight feedback loops to ensure the best quality, and breaking stuff is absolutely required for that to happen. For inspiration, look at how Rust got developed. There will be a time when you'll have a 1.0.0 release where you have to make API guarantees, but until then, the most precious resource is passion and momentum. Optimize for that.
If I may add my 5 cents regarding governance: its a bit too early to worry about that, just "move fast and break things". You'll want tight feedback loops to ensure the best quality, and breaking stuff is absolutely required for that to happen. For inspiration, look at how Rust got developed. There will be a time when you'll have a 1.0.0 release where you have to make API guarantees, but until then, the most precious resource is passion and momentum. Optimize for that.
Re: JavaScript on ESP32 - Duktape
https://github.com/espressif/esp-idf/co ... 66599fe133BuddyCasino wrote:Quite an interesting project! I noticed Bluetooth taking 64K too, and it seems like a lot at least for BLE. Maybe Espressif can say something if this is going to remain that high?
-
- Posts: 263
- Joined: Sun Jun 19, 2016 12:00 am
Re: JavaScript on ESP32 - Duktape
Thanks! 34k for BLE sounds more reasonable, but still kinda high. Nordic Semi does it with 8K I think.
Re: JavaScript on ESP32 - Duktape
Hi there!
I have been playing with https://www.espruino.com/ quite a bit now and I am wondering what the status of this duktape https://github.com/nkolban/duktape-esp32 port. From what I have read here and from the github repo I see not much activity recently. Is it that we are waiting for the 4MByte RAM boards? Is it purely esp32 port (I mean sometimes not much is necessary and esp8266 or other extra cheap board is just fine).
Best Regards
Standa
I have been playing with https://www.espruino.com/ quite a bit now and I am wondering what the status of this duktape https://github.com/nkolban/duktape-esp32 port. From what I have read here and from the github repo I see not much activity recently. Is it that we are waiting for the 4MByte RAM boards? Is it purely esp32 port (I mean sometimes not much is necessary and esp8266 or other extra cheap board is just fine).
Best Regards
Standa
Re: JavaScript on ESP32 - Duktape
Hi there. In my tests, I had been running low on RAM while trying to do what I wanted in Duktape on the ESP32. I now have an instance of the WROVER with its 4MBytes of PSRAM and built a copy of Duktape on it and am delighted to report that it does indeed show a full 4MBytes of available heap. As such, I'll now be going back to Duktape to ensure that it all the other functions are good.
Given the plethora of environments available for the ESP32, I'm not sure how far I'll take it. Interest in the project isn't particularly high and there are a world of other ESP32 related items that are also of interest to the community.
Given the plethora of environments available for the ESP32, I'm not sure how far I'll take it. Interest in the project isn't particularly high and there are a world of other ESP32 related items that are also of interest to the community.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: JavaScript on ESP32 - Duktape
Dear Neil,
First of all thank you for your massive work and and great ESP32 presentations on Youtube (really easy listenable and practically valuable. Truly one of best I have been listening to)
I have found this question to you by @cmason and your answer to it partially answered my own one. However I decided to get sure and clarify.
I intend to develop a portable standalone sensor device which would be used to take data measurements in the field during an expedition and initially log data to flash memory. Upon return to the lab, device would connect to the WiFi and move the data to the PC i.e., as you have described in your tutorial “Charting sensor data”.
Most of my code can be written in C++ and C so I would probably be fine without any LavaScript engine at all, but I need to implement a user friendly WiFi configurator (exactly what ESP32-Duktape has).
If I understood correctly It would probably be best to use Duktape original libraries in my C++/C code for that purpose? Or do you think it is still an overkill and some simpler alternative could be used instead?
Many thanks in advance for your comment!
First of all thank you for your massive work and and great ESP32 presentations on Youtube (really easy listenable and practically valuable. Truly one of best I have been listening to)
I have found this question to you by @cmason and your answer to it partially answered my own one. However I decided to get sure and clarify.
I intend to develop a portable standalone sensor device which would be used to take data measurements in the field during an expedition and initially log data to flash memory. Upon return to the lab, device would connect to the WiFi and move the data to the PC i.e., as you have described in your tutorial “Charting sensor data”.
Most of my code can be written in C++ and C so I would probably be fine without any LavaScript engine at all, but I need to implement a user friendly WiFi configurator (exactly what ESP32-Duktape has).
If I understood correctly It would probably be best to use Duktape original libraries in my C++/C code for that purpose? Or do you think it is still an overkill and some simpler alternative could be used instead?
Many thanks in advance for your comment!
Re: JavaScript on ESP32 - Duktape
The Duktape support provides a JavaScript environment for writing JavaScript based applications. Much of it is itself written in JavaScript. If you are comfortable programming in a C or C++ environment, I would suggest sticking to that as you will find the most pre-existing code fragments and answers on the forums. However for many users, JavaScript provides a better experience for them ... and it is as much personal taste as for technical reasons.
I get the suspicion that what you are looking for is not necessarily a programming environment but some pre-existing library for WiFi configuration. If you had that available in C/C++, would you still need and JavaScript support?
Neil
I get the suspicion that what you are looking for is not necessarily a programming environment but some pre-existing library for WiFi configuration. If you had that available in C/C++, would you still need and JavaScript support?
Neil
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Who is online
Users browsing this forum: No registered users and 8 guests