Giter Site home page Giter Site logo

esp8266 / basic Goto Github PK

View Code? Open in Web Editor NEW
256.0 256.0 215.0 242.08 MB

Basic Interpreter for the ESP8266

Home Page: http://esp8266basic.com

Arduino 6.25% C 68.67% C++ 7.62% Processing 0.67% Python 0.03% Makefile 0.03% Objective-C 4.90% HTML 11.42% CSS 0.16% Perl 0.02% JavaScript 0.20% Shell 0.01%
basic esp8266 interpreter iot websocket

basic's Introduction

basic's People

Contributors

clemrz avatar mmiscool avatar themindfactory avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

basic's Issues

The variable and function names aren't serious (or I believe so)

This is not a issue really (as in doesn't affect the code), but I think that should be fixed to improve readability.

Humorous examples (a selection of the best ones):

GetRidOfurlCharacters
WhatIwillReturn
GetMeThatVar

Serious typos found:
GraphicsEliments
PinDesignaor
VarialbeLookup


Dear maintainer:

What about using global Find and Replace dialog of your favorite text editor to fix these things?

๐Ÿ˜œ

Change the serial baud rate

Hi! I think that this basic interpreter lacks a cool feature. What about changing serial port baud rate? Wouldn't be hard to implement a baudrate {integer}command, no?

PS2Keyboard wrong output

When I press the same button on the keyboard, sometimes another letter will appear on the Serial Output.

I have connected the Keyboard directly to the ESP Pins 34,35 and to VIN (5V) and GND.
Do I need some Levelshifter or will this not help?

+ipd missing

hi, I'm using my esp8266 module as a TCP server. when sending data from multiple client devices it oftenly shows data missing, In that cases +ipd is missing in my received data. expecting your valuable suggetions and solutions on this issue.
My settings are as follows:

AT+CWMODE=1
AT+CWDHCP=0,0
AT+CIPSTA="STA_IP","GATEWAY","SUBNET MASK"
AT+CWJAP="SSID","PASS_WORD"
AT+CIPMUX=1
AT+CIPSERVER=1,2000 I'M USING PORT 2000
AT+CIPSTO=0

AFTER the setting starts connect to the device from client and sends data.. the +ipd missing occures when data receives frommultiple clients...........please help me to resolve this issue...

Is anybody working this as an active project on another fork?

Seems like a lot of potential in this project. Is anybody continuing the work on another fork. The last work on this seems to have been 2016. I may be willing to contribute some dollars to current work contact me I am actually more interested in getting the efficiency of the bascom basic compiler ported to the ESP32. The Bascom compiler produced incredibly efficient code that could run on very small chips so it should have tons of space available on the ESP32.

Fix for the "for next" command

This fix will permit to correct the behaviour of the for next loop
Each argument can be now an expression.
Example :
let a = 10
let b = 20
let c = 30
for i = a/2 to b+c step c/30
print i
next i
Classes.zip

Wrong MAC address

As displayed:
ESP Basic 3.0.Alpha 69
MAC: 1A:FE:34:9B:2F:00

Real MAC as seen by DHCP server:
192.168.2.8 18:FE:34:9B:2F:00

Compile in Ubuntu Linux 16.04

Hello Everybody,

I have try to compile the espBasic but get errors for header files since I don't have clue about where to put the folder. I already have EspArduino working. Also I tried uLisp that work as well.

Is there a documentation, pointer or directions on how to compile espBasic either from command line or using Arduino IDE? I think something like folder layout will be help. I have tried ==> Hardware/esp8266.com/esp8266/ espBasic but this does not work. Please help!

God blesses!!!

Best regards,
Sanyaade

New function to split the arguments

Mike,
you will find here the new function included into a sample of commands.ino.
you can refer to 3 commands done as example :
testparam that will print the parameters; you can use it to understand and check how the splitter works
slider
button
Commands.zip.txt

remove the txt from the file as it's a zip

Lack of web only PRINT command

Hi! I've noticed that there are only three print commands:

  • PRINT: Prints to web and serial port
  • SERIALPRINT: Prints to serial port only (no line ending)
  • SERIALPRINTLN: Prints to web and serial port (with line ending)

But I would like to have a web only print command:

  • WEBPRINT: Prints only to web

Is that easily factible?

No [VARS], no [DEBUG] in menu

ESP Basic 3.0.Alpha 69, 8MBit Wemos D1 mini lite. Everything works, but no [VARS], no [DEBUG] in menu.
image
Any Ideas?

[minor] several corrigendum for Language Reference 3.0

chr():
Will return a character for the given number.
Bla = chr({string or var name}) -> SHOULD BE: Bla = chr({value or var name})

int():
Will return an integer value.
int({string or var name}) -> SHOULD BE: int({value or var name})

oct():
Will return the oct value of an integer.
oct({string or var name}) -> SHOULD BE: oct({value or var name})

hex():
Will return the hex value of an integer.
An optional 2nd argument define the number of digits
hex({string or var name},{nb_of_digits}) -> SHOULD BE: hex({value or var name},{nb_of_digits})

Crash after compiling in own environment

I am trying to reproduce the compiling process. My setup is:

Arduino 1.6.5 (previous experience with ESPEasy taught me to stick to this version, please advice if this was a wrong supposition)
ESP82666 v2.0
Board ESP Node MCU v0.9
Installed all libraries included in the current repository

It does compile. But when starting, it shows on the terminal that it is logged in into the local LAN. Address is something like 192.168.10.104. By either accessing this or accessing the 192.168.4.1, the system makes a dump and reboots itself.

Please advice

esp8266-12e ap mode startup problem

hi guys,
i am sharing my circuit diagram here
the problem i am facing is , i need to reset the esp8266-12e module multiple times to make it work (make it work means starting it in Ap mode as coded ). sometimes it works sometime it doesnt.
please post the suggestions if any one knows.
mycircuit

Fix for the pin 16 i/o crash

When the pin 16 is used with the command po 16 0 or po 16 1, the ESP basic crashes.
After some check I found that the bug comes from the declaration of these 2 arrays in ESP8266Basic.ino.
The lines are 401 and 402 :
String PinListOfStatus[16];
int PinListOfStatusValues[16];
The index should be 17 because the pins goes from 0 to 16 (so 17 elements).
The lines should be :
String PinListOfStatus[17]; // 0 to 16 - fix the po 16 0 crash
int PinListOfStatusValues[17]; // 0 to 16

Cannot clear corrupt BASIC code

I have saved a BASIC code script which causes the ESP8266 to become unresponsive. (This may be a tight loop or bad syntax - code was incomplete when I accidentally hit save.) ESP now starts up, runs code and becomes unresponsive on web interface. Reflashing BASIC interpretor does not fix, presumably because this does not clear the BASIC program memory so the bad code persists.
It may be advantageous to clear program memory when flashing device, or at least offer option to do so.

NUL char cannot be part of a string?

See example below:

print "ESP Basic 3.0.Alpha 69"

' let define some control character
let NUL = chr(0) 'required
let SOH = chr(1) 'can be any
let STX = chr(2) 'can be any

print "correct with any combitation of control char but the NUL"
let s = SOH & STX
print asc(left(s,1))
print asc(right(s,1))

print "wrong if NUL is part of the string"
let s = NUL & STX
print asc(left(s,1))
print asc(right(s,1))

Documentation in GitHub

It would be advantageous to be able to download the documentation. It would further be advantageous to be able to contribute updates / corrections to the documentation. These two may be facilitated by hosting the documentation within a github repository, maybe the same repository as the source code.
When a user configures the ESP8266 as an access point and connects to it to program in BASIC, the user may lose Internet connection which in turn loses access to documentation, hence the advantage of an off-line copy.
It may be advantageous to offer the ability to bundle the documentation in to the ESP8266 BASIC web interface but this may use up too much device storage.

Bug: IDE Editor Open Appends Blank Line

Go to IDE
Select a file in File Manager and click File Manager Edit button or just go to Editor and enter a filename then click Editor Open button
Go to end of file and you will notice that a blank line has been appended.
Click Save, Click Open and go to end of file and another blank line has been appended. This occurs repeatedly.

This bug is repeatable.

File I/O failed

Just installed version 1.68 (Tired both 1MB and 512k version on ESP8266-1 with 1MB flash)

I was able to connect to it via WiFi (SSID=ESP) and browser able to access 192.168.4.1. However I was not able to save config. Tried to hit "Format" button, it just print "1", tried to save but getting "File Open Failed"

I have also tried to use "EDIT" then save, I get the same error too. Looks like File System access is broken at the moment?

I have putty connected at 9600 BAUD and these are the output.

SP Basic 1.68
1
2
3
4
5
6
7
8
9
10
11
12

Failed Wifi Connect
Creating WIFI access point
ESP
APname
file open failed
APpass
file open failed
Starting Default Program
Done...
WIFIname <-- trying to save config
file open failed
WIFIpass
file open failed
APname
file open failed
APpass
file open failed
LoginKey
file open failed
ShowMenueBar
file open failed
otaUrl
file open failed
Formating <-- Trying to "Format"
1Formating <-- and again
1WIFIname
file open failed
WIFIpass
file open failed
APname
file open failed
APpass
file open failed
LoginKey
file open failed
ShowMenueBar
file open failed
.......
Done...
default/1 <--- trying to save the text in "Edit" window
file open failed
default/2
file open failed
default/3
file open failed

On a side note. For some interesting reasons, when I use ESP_Basic_Flasher.exe to flash, my ESP8266 seems unstable and will crash randomly and reboot. But if I flash ESP8266Basic.cpp.bin manually using ESP8266Flasher.exe seems more stable (no crash yet, other than first boot)

Insufficient power for conversion in parasite mode

For parasite mode, while waiting for conversion to take place, the oneWire pin needs to be set as an output (high) and then set back as input before reading back the temperature(s). This is true even for just one device on the oneWire bus. Maybe not true for all esp8266 modules but certainly the case for mine (Adafruit Huzzah)

Missing hader file when compiling

include "spiffs/spiffs.h"

include <FS.h>

include <ESP8266mDNS.h>

include <ESP8266WiFi.h>

include <ESP8266WiFiMulti.h>

include <WiFiClient.h>

include <WiFiServer.h>

//#include <WiFiUdp.h>

include <ESP8266WebServer.h>

include <Wire.h>

include <ESP8266httpUpdate.h>

include <Servo.h>

include <OneWire.h>

include <DallasTemperature.h>

include "Base64.h"

include <WiFiClientSecure.h>

include "ESP8266httpUpdate.h"

include <time.h>

//LCD Stuff

include <LiquidCrystal_SR.h>

include <I2CIO.h>

include <LiquidCrystal.h>

include <LiquidCrystal_SR3W.h>

include <LCD.h>

include <LiquidCrystal_SR2W.h>

include <FastIO.h>

include <LiquidCrystal_I2C.h>

//PS2 Key Board

include <PS2Keyboard.h>

i have only a few of these .h files after installing the ArduinoIDE + esp8266 borads patch in a json format file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.