-
-
Thanks... Well, if the new 1v70 above works then I'm not sure there's much I can do to figure out why @DrAzzy's bigram builds aren't working with your code... I guess it is possible that the extra RAM on-chip is a bit flaky - or its extra flash (the code I'd linked to before didn't test flash memory).
At least the 2250 var build should help out with your memory problems though.
-
Sorry - I just checked and that is an old one without the variable size changes. Try this one:
http://www.espruino.com/binaries/git/commits/5e9662d82b23dcc7068fd61675860cadd6b7aebb/
There was a period when the variable sizes were smaller but the variable count was still 1800 - @DrAzzy's link wasn't one of those though!
If the RAM size check didn't give any errors, looks like it's ok. It may well be the variable size changes then.
What errors do you get, or does the code just inexplicably not work?
If you could give us some example code that exhibited the problem then we might be able to fix it.
-
Great! Thanks! Would you like me to put it in with the Espruino modules, or would you like to do it? instructions here
-
Ok, this will be fixed in the next update of the Web IDE that I do (or you can grab the latest from GitHub if you can't wait ). For now, just change your code to:
digitalWrite([LED1,LED2,LED3],4); setTimeout("digitalWrite([LED1,LED2,LED3],2);", 1000); setTimeout("digitalWrite([LED1,LED2,LED3],1);", 2000); setTimeout("digitalWrite([LED1,LED2,LED3],0);", 3000);
-
I just tried creating an error in the code in the Web IDE and minifying it - and errors do seem to be reported - like in the image below.
I think I've found the problem though - it seems there's a bug in how the Web IDE replaces binary numbers in strings which is causing the minifier to fail without errors. I'll see what I can do to fix it...
-
There is a test... Use the non-bigram version of the code and do what is described here: http://forum.espruino.com/comments/19893/
So the firmware you got fromthe espruino.com link above works but DrAzzy's doesn't?
-
The minimisation is performed by the closure compiler, Espruino Web IDE just sends the data over to it.
The binary literals are ES6 and aren't supported by the minimizer... but when the web ide minimises it usually replaces them for you. I guess it doesn't do it because they are in a string - I'm just surprised that the minimizer picks it up...
What errors do you get with bigram? The new ones will include the new changes for memory usage (hence the larger than normal increase in variables).
I'm still trying to ensure that the new changes work correctly before I make a 'proper' release - so any feedback you have about what is now not working would be hugely helpful.
-
-
I've just merged all this into the main branch, so it'll be in 1v70.
Please check out the latest builds though - the sooner I'm happy that nothing has regressed, the sooner I can release 1v70 which has all these features in!
-
-
Strange... Do you not get that yellow icon in the top-right of the IDE when you connect?
Yes, I need more of an 'announcements' section... And I know - I never get around to posting much in the blogs section. In a way it'd be better if I could just link to forum posts - and at least people can easily reply and discuss whatever the announcement was.
-
ahh... beaten to it :)
Yes, Advanced Optimisations are what's produced by the closure compiler in its 'advanced' mode. Problem is they tend to think that they can rename absolutely everything, which breaks a lot. I think someone could potentially write a configuration for it which explained which things it's not allowed to rename, but I haven't had time to look into it properly.
-
'Module minification' won't be an issue for you - it only applies to modules loaded with
require(...)
if they weren't loaded from the Espruino site (in which case they'd be minified already).The errors will be because the code you're minifying has some problem which means that the minifier can't handle it. I thought it should have told you what the errors were, but you could paste it into http://closure-compiler.appspot.com/home and see what it says.
Do you have any large-ish arrays in your code? I would have thought this was actually most likely to be the problem...
-
-
Great! It's already done! https://github.com/espruino/EspruinoDocs/blob/master/devices/MAX31855.js
It'll go live next time I update the website...
-
The issue is what do people want? Keyboard, Mouse, Joystick? I guess all 3, but that's not possible all at once.
The best solution would probably be to allow people to specify their own USB device IDs and then we could just have some pre-made modules that did the main devices - but it'd also be possible to do all kinds of different peripherals.
-
@possmann there's either http://www.espruino.com/Download or http://www.espruino.com/ChangeLog
Do you use the Web IDE? For most users I wouldn't have thought it was a big issue, as the next time they start the Web IDE it'll tell them?
-
-
That all sounds promising - you definitely need to adjust contrast such that you see the line of black rectangles though.
LCD.write
is for individual characters - so I wouldn't really expect you to see much there.LCD.print
should work though.If setting the cursor is working (but not text), I'm really not sure what to suggest - especially if the cursor appears in the right place.
All I could think is maybe you should re-check the wiring of the data pins. It might be they are in the wrong order or one of them isn't connected.
-
As @DrAzzy says really - it's really easy to fill up available memory if you use normal arrays. Using stuff like Uint8Array, data goes quite a long way though.
Also if you're adding comments, try and add those outside the functions as then they don't get stored in Espruino.
-
-
Hi,
USB HID devices actually enumerate themselves differently to a USB VCP (COM) device - but there's no physical hardware difference, it's all software.
There's a feature request on GitHub for adding this, and I'd definitely like to get it done at some point - https://github.com/espruino/Espruino/issues/221
For Espruino it would actually require modifications to the firmware though - it's not something you could do in pure JavaScript...
For now, I wonder whether there is any possibility of making the VCP device pretend it was a PS/2 keyboard. I guess that might be more easily done on Linux than other operating systems though...
-
Just fixed. In an hour or so the latest should be available at:
http://www.espruino.com/binaries/git/commits/551b5c4adc7962e2485224c767816b9534736d15