You are reading a single comment by @allObjects and its replies. Click here to read the full conversation.
  • Power consumption is one aspect of the whole package... JavaScript has the benefit for the application not to have to deal with concurrency on the low(er)-level API of the underlaying infrastructure... a core goal of @Gordon's design and implementation of Espruino. @Gordon went even further and also picked something that is by nature low power, and consistently, otherwise he would not have chosen MDBT42Q to be the heart of puck.js and pixl.js... and in addition to it: miniaturization... bot not so much claimable by ESP32... considering predecessor ESP8266.

    In order to not loose out on many things and very importantly communication, @Gordon has picked the best options and integrated them - Espruino-Wifi - or made them easy to use w/ the libs for ESP8266 hiding its AT protocol. You can do even certs / https - something that ESP8266 is able to do (doing lower level programming than Javascript / Espruino, but with all loaded runs out memory to do... (see Andreas Spiess' youtube clip #232 How to secure our devices using SSL (ESP8266, ESP32, Tutorial)

    very well explained what's about w/ SSL).

    In real world, @pankleks ' code example for measuring power is not representative at all... especially when thinking of doing a lot of things well organized and not just sleep and once in a while switch a LED on or off. To achieve this low power, @pankleks has to use low level programming of multiple tasks and synchronization there of,... something that for sure is not a makers goal. Not everyone wants to dive int to into the challenges and practices faced in an 'RTOS'. @Gordon has picked the Javascript paradigm of being physically single threaded and added the logical - perceived - multi-threading to support event-driven-ness that is not supported by any of the other implementations, except you go for it (sleeping in the - Arduino / C - main loop is just not an option for a real application...) nor is synchronizing multiple multiple tasks (in micro-python).
    ESP32 (and ESP8266) will run as hot as with Espriuno when actually doing something. Implementing Espruino's low power and event architecture all the way thru on ESP32 is a bit more challenging because of the ESP libs and last but not least the dual core... all to be taken into account. I'm sure it will get better over time... by contributions of many interested in Espruino on ESPs

    As much as the power of ESP32 is desirable and convenient, it requires the absence of low(est)-power requirement under the presumption to be simple in programming.


Avatar for allObjects @allObjects started