Avatar for allObjects


Member since Jul 2014 • Last active May 2017

Very excited about Espruino and even more so about Pico!

Most recent activity

  • in Pico / Wifi / Original Espruino
    Avatar for allObjects

    EDITED previous post. [:>

  • in Pico / Wifi / Original Espruino
    Avatar for allObjects

    For sure you can do that, but ESP32 is powerful enough to run all on it... what you though do not get is power frugalness... In other words, you can use an Espruino as the controling unit and switch the ESP32 on only when you want to communicate... I do not know all the specs of the EPS32, but even when just using BLE, a ESP32 pulls way more than you need for just a BLE. As said, if you can use BLE separately from Wifi...

    So it all depends how you power the stuff...

    What I for sure can recommend is beginning with a Espruino pico or an Espruino/Wifi board (and add separate BLE), because it just runs. Other stuff may be enticing... but the few bucks you save you will pay for ... to drown the insanity you incur when trying to figure out why it's not working. Any gadget's worth is what you get beyond just the hardware...

  • in Pico / Wifi / Original Espruino
    Avatar for allObjects

    Initially, I posted what's below the ////////////// line. ooops... What was I thinking... Lipo?... which goes 'way' beyond the max rating... sorry for confusion.

    Anyway, this is the update and good news:

    ** You are perfectly fine to connect this battery directly to the 3.3V because its highest voltage and worst case is below the maximum ratings. I attached the power schema and maximum rating of the mc from the manual linked on Espruino Pico Reference page. **


    • VDD in attached Power Supply Schema is what is directly connected to the 3.3V 'pin' of the Espruino (boards).
    • Voltage regulator in attached Power Schema is the processor's own and internal core voltage regulator and not the 3.3V voltage regulator I refer to in my post.
    • The 3.3V voltage regulator I refer to in my post is the one on the board that allows to run PICO on USB 5V voltage (and higher... up to 16 volts... which means: you can connect it to a 12V (car) battery (when you have spike suppression/filter; which can be is as simple as thru a 'low-ohm' resistor and then a 'fat' capacitor across 12V and GND; better is though a 'zorp' -Transient-voltage-suppression diode - instead (or) parallel to the capacitor)).


    As stated earlier, you may have various issues by directly connecting this battery to 3.3V:

    • When you connect it directly to to 3.3V and it is fully charged, you may have too high voltage
    • When you connect it to 5V (to power the Espruino through the 3.3V voltage regulator), you may not have enough voltage.

    As you can see from the various graphs in attached battery spec file, you see the voltage from every cell from beginning to be too hight to continuously dropping. It gets really low when approaching 80% discharge... (C in attached graph means Nominal Charge - 1C means 600mA discharge over 1hr, 0.2C means 120mA discharge over 5hours).

    These batteries are really great and work nicely for where they are used: cordless phone that you use while talking, but then you put it back on the station where they get recharged...

    Using 4 such cells are perfect and give you ample reserve to run through the 3.3V voltage regulator to give you a stable power supply even beyond 80% discharge. You can get them in AA or AAA size and nice battery holders for 4 cells as well, and you can charge them with conventional chargers.

    PS: ...have not stakes in organization from where I pulled the tech file, but it is an excellent piece of pager explaining many things greatly...

  • Avatar for allObjects

    @Wilberforce... may be left and right got a bit mixed up... did it...

    Things entered on the left side are JavaScript expressions / statements that are immediately executed. Therefore, if you enter something like var mod = require("moduleName");, Espruino tries to executed that, which means: get the module from the Espruino (memory)'s Modules cache. Since it is not there, Espruino tries to look for it on a mounted SD card. If the card is not mounted, 'mount error' is printed and subsequently the 'module not found error'.

    If you really want to use the left side to load a module into the cache, you have to do it differently - as documented - in Modules.addCached("moduleName","moduleSo­urceCode"); (id and moduleName are the interchangeable).

    If you track what the IDE does when uploading code with a require("moduleName");, it does exactly above: The IDE grabs the file from espruino.com/modules/moduleName.­min.js as text and executes Modules.addCached("moduleName","moduleSo­urceCodeAsReadFromTheFile.min.js");.

    This though has limitations, because it does not handle nested require(...): if a module source code that you push into the cache in the left side of the IDE, you also have to that recursively for all the included require(...).

    If entered in the right side - editor side - and uploaded using the upload button - all this is taken care of.

    Now there may be the situation that modules are in deed on an SD card and the SD card is mounted on the Espruino board. If you then want to take advantage of that while still uploading code from the Editor side, you would stick the moduleName as string into a variable and then use the variable in the require expression:

    var moduleNameVar = "moduleName";
    var mod = require(moduleNameVar);

    Doing it this way, the upload process does not find a literally required module (finding the exact character sequence require("...") and therefore not jump into action a retrieve the module from the Web / or local project/modules/ sandbox folder and upload it to the Modules cache.

    When it then comes to execution, the module is not found in the Modules cache but it would hen find it on the mounted SD card (if the card is mounted...).

    (PS: there is now also an option that modules are stored as functions in Espruino cache... I do though not know how it could be done using the left side... may be the reference doc is not updated yet...).

  • in Interfacing
    Avatar for allObjects

    Why would you use a .connect() function / method to create a Rodrigues instance?

    I know hat this pattern is typical for connecting devices. But in this case, it is just a transformer, isn't?

    To return a constructor function in a require, just set the exported object to it: exports = Rodrigues;.

    If you want to stick with the pattern, you can return exports.getInstance = function() { return new Rodrigues(); } to provide a self documenting function.

  • in Pico / Wifi / Original Espruino
    Avatar for allObjects

    It is not clear where you enter this. It is expected to be in the editor / right hand pane of the Web IDE and then uploaded.

    When you are connected to the Web / internet and do the upload to the Espruino board, your code is first parsed for modules required with require("..."). The modules are pulled from espruino.com/modules/ folder, for example -
    in this case - either as EspruinoWiFi.js or EspruinoWiFi.min.js, uploaded to the Espruino board and stored in the Modules cache on Espruino board. After that, your code is uploaded. When it comes to execution of your code, require(...) will find the requested modules in the Modules cache and load/use them. If it cannot find them in the Modules cache, it tries to find a mounted SD card and looks for it there. If no card is mounted, the error message you see is what you get.

  • in General
    Avatar for allObjects

    There may be many things to be factored into your decision... price is one, anther one is what is how you power your devices, yet another one is your wifi infrastructure.

    esp32 - Espruino on ESP32 is a multi-core (duo core) processor and has also more memory resources. About how far the port of Espruino - that includes all the support incl HTTPS - has been achieved, you have to track down the conversations in the forum... I know that @Wilberforce, @JumJum, @Kolban (and others) have worked on its guts, and I have nowhere read that SSL would not be supported. From conversation Writing an SSL HTTPS web server ... I read that connecting with https to a server in the net is there, but not running a https listening server on ESP32.

    Looking up some more info about SLL and ESP8266, I came across this nice youtube

    and follow-up presentation. It talks about the space issue creating functions involved in SSL communication. Going to a single, defined server gives some relieve, and may be an option to go with less resource...

  • in General
    Avatar for allObjects

    ...there you go, thanks @Wilberforce...

    @AlessioBacin, just get a Espruino board that has a real ARM3 or 4 on it and use your ESP12E as plain wifi stack device. Talk to it with serial as supported in any Espruino and this way you get your https connection and programming in JavaScript.

    'Alternative' is using LUA on the ESP12E... but you could stick to Arduino then...

  • in Interfacing
    Avatar for allObjects

    ...I expected you to put the sensor onto the stirling engine fly wheel... a centered / balanced puck and sensor would work to measure the RPM. ;-)