snippets for the IDE #5263
Replies: 1 comment
-
Posted at 2015-11-27 by @gfwilliams Cool - thanks for posting up! For others looking at this, the last 2 code snippets here are ESP8266-specific Posted at 2016-01-02 by Arman I think there is a mistake here. The module names are case sensitive so Wi-Fi should be:
Posted at 2016-01-02 by tve Yup, the module name changed... Posted at 2016-01-03 by @MaBecker updated to work with 1v84.tve Posted at 2016-02-26 by Wilberforce What is the proper way of adding snippets? I'm editing the json in terminalsnippets.txt and feeling a little dirty. Posted at 2016-02-27 by @MaBecker Use the project icon to add snippets Attachments: Posted at 2016-02-27 by Wilberforce Thanks. Here are mine:
For the wifi one, run the snippet to define the function, then join your network.
The clear command history is used when you are running low on space, and want to free up some memory. Posted at 2016-02-27 by Ollie Nice. I like the ClearCmdHistory one. How much memory can this give back. I know it gets run if 'save()' fails, but never thought of it as something to use at runtime. Thanks! Posted at 2016-02-27 by Ollie Nice. I like the ClearCmdHistory one. How much memory can this give back? I know it gets run if 'save()' fails, but never thought of it as something to use at runtime. Thanks! Posted at 2016-02-28 by Wilberforce The 2nd one - process.memory() shows the space taken up by command history. On loading large bits of code, I sometimes use the clear cod history line to free up space will it is interpreting... Posted at 2016-02-29 by @gfwilliams
I'm afraid that should be of no use at all. If Espruino starts to run out of memory it will automatically remove the command history one item at a time.... So it's unlikely that clearing it yourself will let something run that wouldn't have run otherwise. ... and if it does, that could well be a bug :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-11-27 by @MaBecker
this is what I find helpful for now :
let me know what you use
looks like that in the EDI
Attachments:
Beta Was this translation helpful? Give feedback.
All reactions