-
-
-
Just for anyone trying today, the nightly builds are back up: https://espruino-nightly.noda.se/2013-12-13/
-
Yes, sadly it's a huge regression in that version of Espruino that causes it to leave off the last few characters of the function.
It should have been fixed in last night's nightly build, but because of the filename change, that hasn't appeared!
For now, type:
var onInit = function () { SPI1.setup({sck:A5,miso:A6,mosi:A7}); SPI1.send([0x90],A4); };123
If you add a few characters after every function definition then you'll be fine.
Sorry about that - everything is in flux at the moment. I'm trying really hard to get everything ready for KickStarter and I don't have time to make sure everything works on cutting edge git all the time.
-
-
Publishing to npm would be great - it'd be great to be able to give people easier steps to get it!
As far as getting that list of builtins, it might be easier to just copy the JSON directly from source files and let you do what you need with it. For instance:
https://github.com/espruino/Espruino/blob/master/src/jswrap_string.c#L18
There's some documentation on the format here: https://github.com/espruino/Espruino/blob/master/scripts/common.py#L32
-
It's actually been added now - sorry. That's the problem, you can't keep everyone happy.
In the case of I2C/SPI/OneWire it's fine as they are ignored (and the relevant SPI setup command is added) - it is only when you've set a pin as a simple output or have added pullup/pulldowns to an input.
For beginners, there is something nice about saying
LED1.set();save();
though -
-
-
Hi Andrey,
That's you problem I'm afraid. We haven't uploaded the latest version to the Chrome Web Store yet. However if you install the version from GitHub it should work:
https://github.com/espruino/EspruinoWebIDE
You will probably need to install an espruino-nightly image as well
-
-
At the moment there isn't a direct replacement. You can do:
digitalWrite(pin, 1); setTimeout(function() { digitalWrite(pin, 0); setTimeout(function() { ... }, 0.35); },0.35);
or you can do:
digitalPulse(pin,1,0.35);
Which will be substantially more accurate. This actually starts executing subsequent commands (apart from other digitalPulses) before the pulse has ended, so for something more accurate, you could try:
digitalPulse(pin,1,0.35); digitalPulse(pin,0,0.35);
I'm trying to discourage people from writing code that delays (because then they start to get annoyed that Espruino isn't multithreaded), however I think delays do need to be added for this kind of thing - I've put a bug in for it, so hopefully I'll get around to it at some point.
-
Hi Gamaiel,
That looks really cool - it doesn't seem to handle multi-line editing yet though?
There's actually some simple autocomplete code in the Espruino Web IDE at the moment - as it's also JS I wonder if it can be shared... https://github.com/espruino/EspruinoWebIDE/blob/master/js/codemirror/addon/hint/espruino-hint.js
I intend to improve that quite a lot at some point (I'll export some data from build_docs.py in Espruino) so it'd be cool if your project could take advantage of that (or could help the Web IDE as well ;)
As it looks like you're caching the whole JS command before sending it to Espruino, syntax highlighting would be awesome :)
-
Great! There's actually twice that amount of memory available on there too, but at the moment I'm having issues keeping the code size down - so any more memory and you can't save :(
On the video, I just soldered headers on. They're cheap to buy, and it makes hacking stuff up easier as you can just plug and unplug wires. Also, at the bottom I'd soldered on a Bluetooth module (HC-05) so it could be controlled (or could send data wirelessly).
-
Just wanted to add that you should check this out: http://forum.espruino.com/conversations/340/
The 3.2" board had an issue where there was at least 4x less memory than there should be
-
If you have the 3.2, try this: http://www.espruino.com/files/espruino_hystm32_32_vc_1v43_beta.zip
-
-
This is expected behaviour. If you want to force LED1 on at startup, do:
function onInit() { LED1.write(1); } save();
I'd been considering saving pin state, but I'm not sure if it's such a good idea as often connected devices will actually need more complex initialisation done to them than just setting pin state back exactly as it was. I think very often it's actually better to force people to explicitly set the pin state.
I'd be interested to hear what everyone thinks though.
-
-
-
Hi Mudderman,
It looks like you're doing the right thing...
When the flasher says
Chip replied with a NACK
, have you tried just running the flasher again - without resetting the board? I've had that happen sometimes.It's not a big deal if flashing fails and you need to do it again - the bootloader is built in to the chip, so you can never kill it.
-
The command-line still evaluates everything in order, as you type it... The if statement won't evaluate again unless you tell it to.
You could do something like:
And now, that code will keep being called every 100ms so if you write
a=20
, everything will update as you expect.