-
• #2
Modules are only loaded when you send from right side of the web ide (since otherwise you're interacting directly with the espruino). Is that it?
-
• #3
I'm not sure what to suggest - is it possible that you've somehow modified the settings?
Under
Communications
:- Module URL should be
http://www.espruino.com/modules
- Module Extentions should be
.min.js|.js
You could try installing the Web IDE manually from https://github.com/espruino/EspruinoWebIDE. When you do that, you can the use the Chrome Debugging tools to get a log window where you might be able to see what's going on.
- Module URL should be
-
• #4
Thank you for your reply, yep, I was dumb on this, the module loaded well (I guess) when sent from the right side - just thought the error was the same, but now another thing came up, and that occured first. I have the PN532, and when I connect it and want to run this code:
I2C1.setup({scl:B6, sda:B7}); var nfc = require("PN532").connect(I2C1); nfc.SAMConfig(); // Start listening console.log(nfc.getVersion());
this happening:
Uncaught Error: Field or method does not already exist, and can't create it on Uint8Array at line 1 col 288 ...this.i2c.readFrom(36,d+1),b.slice(6)} ^ in function "cmd" called from line 1 col 31 {return this.cmd([20,1,20,0],8)} ^ undefined =undefined Uncaught Error: Field or method does not already exist, and can't create it on undefined at line 1 col 288 ...this.i2c.readFrom(36,d+1),b.slice(6)} ^ in function "cmd" called from line 1 col 23 {var a=this.cmd([2],12);return{chip:"PN5"+a[2].toString(16),... ^ at line 1 col 46 ...],12);return{chip:"PN5"+a[2].toString(16),firmware:a[3]+"."+... ^ in function "getVersion" called from line 1 col 28 console.log(nfc.getVersion());
Before the firmware update it had worked, didn't even touched it for a long time after it worked.
Any guess? :/ -
• #5
Ahh - thanks. Sorry, this was because the new firmware sends back the (more efficient) Typed Arrays from I2C, and I hadn't tested it with the NFC module.
I'll fix this now and will get back to you in an hour or so (I need to do a new firmware release anyway).
-
• #6
Thank you :) Great support you provide I have to say.
-
• #7
Ok, fixed. You can get one of the 'cutting edge' builds from here: http://www.espruino.com/binaries/git/commits/15258560d35c23a6ed1ae8ba4b3089bf26aa58ba/
See http://www.espruino.com/Download for how to use them...
You probably guessed but the NFC module was using
Array.slice
, which works on Arrays, but not on Typed Arrays (in the ES5 standard). The not-released-yet ES6 standard does have slice on Typed Arrays though, so I just added that.
Somehow Web IDE just stopped pulling modules from the online source, so I couldn't use any of the not integrated ones. On any module I try to require, it says "ERROR: Unable to mount SD card : NOT_READY \n WARNING: Module "xyz" not found" (I tried with module "PN532" and "KeyPad") and I don't know what to do. Even the Firmware update notification stuff working, so it couldn't be a network issue, the module link is correct in settings, and everything seems well, but still it doesn't work.
Can anyone help me, please?
Csandor