Current News

Moderator: Mmiscool

User avatar
By Mmiscool
#45319 Stability improvements and bug fix for ip () function.
Added the val() function. Will return a numeric value from a string.

New feature. If you ground gpio 0 between 12 seconds and 30 seconds after boot it will not run the default program.
User avatar
By cicciocb
#45336 Just to add some more details to this update ESP Basic 2.0.Alpha 10

- The variable management has been improved; now "1234" is a string and 1234 is a number
- Add several error checking on the functions; now error messages should replace some crashes
- Implementation of the val() function; this is to convert from string to number (opposite of str() )
- new command pwmfreq freq : permit to set the frequency of the PWM outputs
- Fixed some internal snags / removed unused code
- GPIO0 at gnd after reset, inhibit the autostart of "default.bas"

The pwmfreq command can be used to generate a tone.
Example :
pwo 13, 512 // tone on the pin 13 ( squared waveform duty cycle 50%)
for i = 1 to 1000 // frequency from 1 to 1000 Hz
pwmfreq i
next i

// another example //
pwo 13, 512 // tone on the pin 13 ( squared waveform duty cycle 50%)
pwmfreq 262
delay 1000
pwmfreq 294
delay 1000
pwmfreq 330
delay 1000
pwmfreq 349
delay 1000
pwmfreq 392
delay 1000
pwmfreq 440
delay 1000
pwmfreq 494
delay 1000

// autostart
The autorunning of 'default.bas' after the restart of the module can be stopped putting the pin GPIO0 to GND;
this must be done just after the reset and not before, otherwise the module will go in "firmware update mode".
This can be acheived on some modules (like the NODE MCU) pressing on the flash button few seconds after the reset and holding it for 30 seconds.
User avatar
By Electroguard
#45352 Simply astonishing! You guys are magicians - not just for what you do, but for how quickly you do it.
Basic 2.0.Alpha 10 is much more stable - I was able to reformat then reflash first time without any probs.
And Yay ... ip() works like a charm in AP mode.
Thanks, fellas.
User avatar
By Electroguard
#45380 Some observations about Alpha 10...

I've been using it all day and it's been great. It has only crashed once, and that was my own silly mistake for having a print "" statement that contained the word NEXT which just happened to wrap around to the next line, and I think was being interpreted as a NEXT command that didn't have a corresponding FOR TO.

After crashing, it started repeatedly rebooting again, and no amount of saved edit corrections was able to stop it.

So I had to reflash Alpha 10, but after restarting and re-pasting and saving the cleaned script, it still kept on rebooting.

I reflashed it again after first doing a reformat, then everything was fine again.


But it suggests that it's not the ESP Basic dump part of memory that is being corrupted, otherwise it would have been sorted when it was overlayed with the reflashing, therefore its somewhere else in the rest of memory, which only gets overlayed and corrected by the reformat.

Now that I know the memory AFTER the reflash dump can cause persistent errors even after the reflash, I don't think there is much value in me doing a reflash without a reformat first, especially to try to fix any problems.


But if the assumptions are correct, then it may raise a couple of possibilities...

A 'Clean memory' button on the flashing tool which could just overlay the remaining non-system area of memory if that is possible.

A 'Complete Reflash Recovery' button on the tool that could append a remaining clean memory dump after the reflash system file so that it overlays ALL memory in one go without needing to reformat first.

Remember I'm only a grateful user who doesn't really know what he's talking about, but I thought it was worth mentioning just in case.