Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    fanoush
    @fanoush
    there is slightly shorter version like jsvUnLock(jspEvaluate("require('bootcode');",true)); but it doesn't matter of course, also typically one adds his own code marked with 'init' an 'kill' instead of modifying jsinteractive, see e.g. https://github.com/espruino/Espruino/blob/master/libs/microbit/jswrap_microbit.c#L140 or https://github.com/espruino/Espruino/blob/master/libs/banglejs/jswrap_bangle.c#L2084
    Erik Botö
    @erikboto
    I figured the board specific init functions were more for setting up hw etc that are board specific? I want to bootcode (which basically just starts my "app") to run on all boards.
    fanoush
    @fanoush
    it doesn't have to be board specific, it is just 'library' so extension of Espruino that hooks into internals, e.g. network does this https://github.com/espruino/Espruino/blob/master/libs/network/jswrap_net.c#L36
    you could also craft custom prepopulated filesystem for Storage but that is not done as it has its own issues - like overwriting everything on update
    fanoush
    @fanoush
    actually the library concept is described in toplevel readme https://github.com/espruino/Espruino/tree/master/libs
    ildar
    @ildar:matrix.org
    [m]
    greetings!
    Q: is there a bundle of modules to install in order to have an Espruino feature-rich smart watch? Or a good article/video what a user can install for that?
    Mark Becker
    @MaBecker
    Sure, I just do
    Thanks
    Mark Becker
    @MaBecker
    I use .boot0 for those stuff, because if there are errors it does not freeze and it is possible to skip loading during pressing the button during startup for original Espruino devices. Which means I use a three step setup: firmware, modules and code.
    ildar
    @ildar:matrix.org
    [m]
    sure. I mean I look for a list of modules that are known to be stable and build up a good smart watch (not a hacking playground)
    Erik Botö
    @erikboto

    actually the library concept is described in toplevel readme https://github.com/espruino/Espruino/tree/master/libs

    Thanks for pointing this out, I see now what you mean and it does seem like a cleaner way to add this!

    @fanoush That was meant as a reply for you, not used gitter so apparent I didn't reply the correct way :)
    Sahin D.
    @seahindeniz
    Hi everyone, is there a documentation for the "ws" module/library?
    I have found a link to an NPM page which is also a WebSocket library however, it doesn't seem right
    With "ws" library on npm, you can get current status of an open socket with .readyStateproperty but this property returns undefined with Espruino's built-in "ws" module
    Mark Becker
    @MaBecker
    Sahin D.
    @seahindeniz
    Already did and these pages doesn't have the information
    I have found the source https://www.espruino.com/modules/ws.js and seems like it doesn't have readyState property. ws.jshas a boolean .connected property which I assume indicates the status of the clients connection status however, in runtime, after a socket connection gets terminated by the server, the .connected prop stays true even after calling .send method and receiving an error
    image.png
    I'll take a look at the source code when I get free and try to find the reason
    Mark Becker
    @MaBecker
    Well I think this is a striped down version of ws , you are welcome to add functions or fix bugs ;-)
    Sahin D.
    @seahindeniz
    Sure! Also, is there a repository link to the "ws.js" file?
    Sahin D.
    @seahindeniz
    Thanks!
    davidmoshal
    @davidmoshal
    Hi, wondering if there's a way to debug the tinyMQTT library (MaBecker)?
    I'm able to connect to wifi, and after that I try to connect to an mqtt server, but get no error. ie: no mqtt.on('error'). So, after connecting to wifi and then calling mqtt connect or create, no errors are thrown, but the state is not connected.
    davidmoshal
    @davidmoshal
    theoretically this should connect, correct?
    const mqtt = require("tinyMQTT").create('test.mosquitto.org');
    
    var wifi = require("Wifi");
    wifi.connect("...", {password:"...."}, function(){
      console.log("wifi connected");
      mqtt.connect();
    });
    wifi.stopAP();
    Mark Becker
    @MaBecker
    Yes, I guess an issue with wifi, but better create a conversation here http://forum.espruino.com
    davidmoshal
    @davidmoshal
    ok, moving there, but wifi is working just fine
    davidmoshal
    @davidmoshal
    Job opportunity: mentoring experienced Java/Javascript developer in setting up C/C++ environment for developing custom ESP32 firmware for espruino.
    Mark Becker
    @MaBecker
    there are two link to build documents
    Mark Becker
    @MaBecker
    ups .....
    davidmoshal
    @davidmoshal
    thanks @MaBecker , my budget is $1,000 for a few lessons on getting set up with C/C++ toolchain, firmware debugging, etc.
    Mark Becker
    @MaBecker
    are you planning to use Espruino commercial?
    davidmoshal
    @davidmoshal
    I'm planning to potentially do something commercial, undecided on Espruino vs Duktape, vs Moddable, etc.
    Mark Becker
    @MaBecker
    ok
    abhigkar
    @abhigkar
    root@AbhinavPC-10:/mnt/d/EspruinoProject/Espruino-1# which nrfutil
    /usr/local/bin/nrfutil
    root@AbhinavPC-10:/mnt/d/EspruinoProject/Espruino-1# which adafruit-nrfutil
    /usr/local/bin/adafruit-nrfutil
    root@AbhinavPC-10:/mnt/d/EspruinoProject/Espruino-1# nrfutil version
    adafruit-nrfutil version 0.5.3.post16
    root@AbhinavPC-10:/mnt/d/EspruinoProject/Espruino-1# adafruit-nrfutil version
    adafruit-nrfutil version 0.5.3.post16
    root@AbhinavPC-10:/mnt/d/EspruinoProject/Espruino-1#
    this is s bit strange I have nrgutils and adafruit-nefutil. both are in different location. But when I called both are pointing to adafruit-nrfutil
    I cannot build DFU packages
    GEN espruino_2v07.9_sparkfun.hex
    Creating DFU ZIP
    # nrfutil  pkg generate --help
    nrfutil pkg generate espruino_2v07.9_sparkfun.zip --application espruino_2v07.9_sparkfun_app.hex --application-version 0xff --hw-version 52 --sd-req 0x8C --key-file targets/nrf5x_dfu/dfu_private_key.pem  
    Usage: nrfutil [OPTIONS] COMMAND [ARGS]...
    Try "nrfutil --help" for help.
    
    Error: No such command "pkg".
    make: *** [make/common/NRF5X.make:453: espruino_2v07.9_sparkfun.zip] Error 2
    because adafruit-nrfutil does not have pkg argument.
    any fix? I am using WSL for Windows 10
    fanoush
    @fanoush
    they share same libraries but require different versions so cannot coexist in same python version/environment, try to install nrfutil in python2
    ysfss
    @ysfsvm

    hi, I've compiled an espruino for the id205 (it still exists in the original espruino repo). I had to change a few things to build. I think these are not critical things, at least enough to prevent the watch from booting. It shows
    WATCHDOG
    DFU 2.9.30
    booting...

    and always resets. Any ideas?

    abhigkar
    @abhigkar
    Thanks @fanoush , Ubunto 20.04 does not comes with Python2.7 and Pip2. Thus it was diffcult for me to manage different Python and Pip version.