Avatar for user76916

user76916

Member since May 2017 • Last active Mar 2018
  • 3 conversations
  • 9 comments

Most recent activity

  • in Other Boards
    Avatar for user76916

    So, both the modules, MDBT42Q and STM32** have ARM cortex M4 based processor. So I thought in Puck (essentially MDBT42Q itself), Espruino runs on this ARM cortex.

    If I got you correctly, you are saying I could flash Espruino on the MDBT42Q with nRF52DK ?
    Since you have already done so in Puck (MDBT42Q), can you please help me understand if this is the proper way indeed ? Or possibly use a Segger JTAG ?

    Thanks.

  • in Other Boards
    Avatar for user76916

    Hello,

    I got a new MDBT42Q module from Raytac. I want to flash this with Espruino. I downloaded the espruino_1v96_puckjs_app.bin. Using USART, I am unable to program the device with Espruino.

    We are using the program stm32loader.py (link) . However, the handshake never happens giving error

    Can't init. Ensure BOOT0=1, BOOT1=0, and reset device
    

    This is even though we are pressing the button when inserting the battery to let it go to boot loader mode.

    Please help with the process of flashing Espruino into an MDBT42Q module.

    Regards

  • in General
    Avatar for user76916

    Ok. I see. I reset my flash, put the wifi require in an onInit function, without actually connecting to the WiFi (since I need that at times only). It works now. I understand that the networkJS is a native inbuilt module and bundled with the firmware.

    Thanks so much !

  • in General
    Avatar for user76916

    NetworkJS not found error again ! After many years ;; Espruino WiFi board.

    • 7 comments
    • 3,590 views
  • in Pico / Wifi / Original Espruino
    Avatar for user76916

    Hi there,

    So, if you have a require statement, you have to write the statement (or your code) on the right side of IDE and upload. This process downloads any dependency from the internet and uploads them correctly to the device. You will get a module not found error if you write a require statement in the REPL.
    A typical program would then have an onInit() function and a save() statement at the end of file for persistence.
    The modules are downloaded from https://github.com/espruino/EspruinoDocsĀ­/tree/master/devices
    A typical program would look like this-

    clearWatch();
    var wifi;
    var werr;
    let WIFI_NAME = 'something';
    let WIFI_OPTIONS = { password: 'something' };
    let w_conn = 0;
    
    function onInit() {
      console.log('here');
      connWiFi().then(succ => {
        w_conn = 1;
        console.log('connected !');
        digitalPulse(LED2, 1, 100);
      }, err => {
        werr = err;
        console.log('some error in wifi connection');
      });
    }
    function connWiFi() {
      let prom = new Promise((res, rej) => {
        wifi = require('EspruinoWiFi');
        wifi.connect(WIFI_NAME, WIFI_OPTIONS, err => {
          if(err) rej(err);
          else res(1);
        });
      });
      return prom;
    }
    save();
    
  • in Pico / Wifi / Original Espruino
    Avatar for user76916

    Oh I got you. I was directly using screen on my mac assuming the firmware has that js module. :)
    Thank you so much !

  • in Pico / Wifi / Original Espruino
    Avatar for user76916

    Hi,

    When I enter on my Espruino WiFi

    var wifi = require("EspruinoWiFi");
    

    I get the error,

    ERROR: SD card must be setup with E.connectSDCard first
    WARNING: Module "EspruinoWiFi" not found
    =undefined
    

    The firmware is 1v91. Any help appreciated on whether this is a hardware or software issue.

    Thanks.

    • 3 comments
    • 2,272 views
Actions