• Sun 2021.09.19

    Repeatable on both native WebIDE and web based espruino\ide
    Repeatable on either editor upload or direct console entry



    I have worked two days on attempting to get neopixels to run on a Nordic nRF52840 Dongle based on the work that @AkosLukacs did two years ago.

    http://forum.espruino.com/conversations/323658/?offset=100

    post #123   Nordic "nRF52840 Dongle" Support

    As can be seen from the console output, the first two lines will upload and execute fine. As the third linerequire("neopixel") starts to upload, the WebIDE locks.



    Board Green LED is D6 - For neopixel also tried D2, D13, D29, D31

    digitalWrite(D6,0);
    pinMode(D2,"output");
    require("neopixel").write(D2, [11,11,0]);
    
    >process.env
    ={
      VERSION: "2v06.6",
      GIT_COMMIT: "db576d70",
      BOARD: "NRF52840DONGLE",
    
    "BAUD_RATE":"115200"
    



    Note the require statement is commented out - 4th line of L5

    [success] Connected to COM10
    >>> Connected to COM10
    Found a prompt... great!
    Splitting for reset(), delay 250
    SET chrome.storage.sync = {"AUTO_SAVE_CODE":true,"BAUD_RATE":"115200","BLOCKLY_EXTENSIONS":"|bluetooth|robot|","BLOCKLY_LANGUAGE":"en","BLOCKLY_TO_JS":false,"BOARD_JSON_URL":"http://www.espruino.com/json","CODE":"digitalWrite(D6,0);\n\npinMode(D2,\"output\");\n//require(\"neopixel\").write(D2, [11,11,0]);\n","COMPILATION":true,"COMPILATION_URL":"https://www.espruino.com/service/compiler","DISABLE_CODE_HINTS":false,"ENABLE_Testing":false,"ENV_ON_CONNECT":true,"FONT_SIZE":12,"MINIFICATION_DeadCode":true,"MINIFICATION_LEVEL":"","MINIFICATION_Literal":true,"MINIFICATION_Mangle":true,"MINIFICATION_Unreachable":true,"MINIFICATION_Unused":true,"MODULE_AS_FUNCTION":false,"MODULE_EXTENSIONS":".min.js|.js","MODULE_MINIFICATION_LEVEL":"","MODULE_PROXY_ENABLED":false,"MODULE_PROXY_PORT":"","MODULE_PROXY_URL":"","MODULE_URL":"https://www.espruino.com/modules","OFFLINE_DATA":"","OFFLINE_DATA_DOWNLOAD":"","OFFLINE_DATA_UPLOAD":"","OFFLINE_ENABLED":false,"RESET_BEFORE_SEND":true,"SAVE_ON_SEND":0,"SERIAL_AUDIO":"0","SERIAL_TCPIP":"","SERIAL_THROTTLE_SEND":false,"SET_TIME_ON_WRITE":false,"SHOW_CODE_LINK_ICON":false,"SHOW_WEBCAM_ICON":0,"STORE_LINE_NUMBERS":true,"Sound_Error":"","Sound_Info":"","Sound_Success":"","Sound_Warning":"","Speak_Error":false,"Speak_Info":false,"Speak_Success":false,"Speak_Warning":false,"UI_MODE":"Normal","WEBCAM_CONSTRAINTS":0,"projectEntry":"ECDBE226B08643DC748E4DFA98647B9D:EspruinonRF52840"}
    Config.BAUD_RATE => 115200
    Found a prompt... great!
    Splitting for reset(), delay 250
    Found a prompt... great!
    Splitting for reset(), delay 250
    

    Code executes as it should and board responds to commands entered from the console.


    Locks - note the un-commented require - 4th of L2 - so it is this line

    >>> Connected to COM10
    SET chrome.storage.sync = {"AUTO_SAVE_CODE":true,"BAUD_RATE":"115200","BLOCKLY_EXTENSIONS":"|bluetooth|robot|","BLOCKLY_LANGUAGE":"en","BLOCKLY_TO_JS":false,"BOARD_JSON_URL":"http://www.espruino.com/json","CODE":"digitalWrite(D6,0);\n\npinMode(D2,\"output\");\nrequire(\"neopixel\").write(D2, [11,11,0]);\n","COMPILATION":true,"COMPILATION_URL":"https://www.espruino.com/service/compiler","DISABLE_CODE_HINTS":false,"ENABLE_Testing":false,"ENV_ON_CONNECT":true,"FONT_SIZE":12,"MINIFICATION_DeadCode":true,"MINIFICATION_LEVEL":"","MINIFICATION_Literal":true,"MINIFICATION_Mangle":true,"MINIFICATION_Unreachable":true,"MINIFICATION_Unused":true,"MODULE_AS_FUNCTION":false,"MODULE_EXTENSIONS":".min.js|.js","MODULE_MINIFICATION_LEVEL":"","MODULE_PROXY_ENABLED":false,"MODULE_PROXY_PORT":"","MODULE_PROXY_URL":"","MODULE_URL":"https://www.espruino.com/modules","OFFLINE_DATA":"","OFFLINE_DATA_DOWNLOAD":"","OFFLINE_DATA_UPLOAD":"","OFFLINE_ENABLED":false,"RESET_BEFORE_SEND":true,"SAVE_ON_SEND":0,"SERIAL_AUDIO":"0","SERIAL_TCPIP":"","SERIAL_THROTTLE_SEND":false,"SET_TIME_ON_WRITE":false,"SHOW_CODE_LINK_ICON":false,"SHOW_WEBCAM_ICON":0,"STORE_LINE_NUMBERS":true,"Sound_Error":"","Sound_Info":"","Sound_Success":"","Sound_Warning":"","Speak_Error":false,"Speak_Info":false,"Speak_Success":false,"Speak_Warning":false,"UI_MODE":"Normal","WEBCAM_CONSTRAINTS":0,"projectEntry":"ECDBE226B08643DC748E4DFA98647B9D:EspruinonRF52840"}
    Found a prompt... great!
    Splitting for reset(), delay 250
    


    At this point, powering down is the only option.

    Also toyed with minification and Esprima settings

About

Avatar for Robin @Robin started