-->
Page 1 of 2

ESP8266 BASIC documentation

PostPosted: Sun Nov 15, 2015 12:08 am
by heckler
Hi,
Thank you so much for sharing your BASIC OS for the esp8266.

I have run across at least 2 basic commands that do not seem to be documented in the command reference...

temp
oled

where can I find more information about these commands??

thanks so much
dwight

Re: ESP8266 BASIC documentation

PostPosted: Sun Nov 15, 2015 8:06 am
by Mmiscool
The oled commands are in testing. Just added them last night. Still might be changing a bit because of peoples testing.

As for the temp command this must have just slipped my mind. Will be adding this to the docs today.

Re: ESP8266 BASIC documentation

PostPosted: Sun Nov 15, 2015 10:31 am
by heckler
thanks mmiscool!

2 followup questions...

1. After installing the BASIC os on the module, how much memory is left for user BASIC programs? How is the user BASIC program stored on the module? where does it get interpreted (in the IDE or on the module)??

2. I noticed you put out a request for help in developing the BASIC commands. What type of environment are you writing the basic in?? is it written in arduino C? is it in some sort of machine language? In other words what programmin skills would a good devloper need to assist in enhancing BASIC for esp8266?

thanks
dwight

Re: ESP8266 BASIC documentation

PostPosted: Sun Nov 15, 2015 10:45 am
by Mmiscool
The interpreter is written in arduino c/c++

Source code can be found at https://github.com/esp8266/Basic/tree/m ... P8266Basic

As to the amount of memory available we have 2 kinds.

Ram and flash. Ram usage is the same across all the modules for the same program.

Flash memory which is where your basic program lives is different for each flash size.

Currently on a 512k module approximately 64k is available for storage space.
On a 1M module you get 512k of storage for the bsic programs.
On a 2 mb module you get 1M of flash for basic applications.
On a 4M module you get 3M for you basic programs.

ESP8266Basic uses the spiffs file system. The same one that comes with the arduino environment.


Interpretation of the basic program takes place on the device. All program editing is done via the browser. This has been tested on a wide range of computers,phones and tablets.

I have tried to take special care to make sure that the watchdog on the chip dose not kick in rebooting the cpu for tight loops. This is why at some point it might seem a bit sluggish but at other times it fast as can be. I though that stability is more important that any thing else.


The design philosophy has been that you really should not have to declare things before they are used like pins. Why would you want to have to specify a pin is an output before using it as an output.