You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mJS3 is a single-source-file JavaScript engine for Arduino IDE microcontrollers.
5
+
ESP8266-Arduino-JavaScript is a Arduino IDE Library to implement a JavaScript engine for Arduino IDE ESP8266 microcontroller.
6
6
7
-
## Demo Install
7
+
## Library Install
8
8
9
-
- Download (Clone) this github repository and copy the folder (as is no need to rename it) into your user Arduino Folder (C:\Users\USER\Documents\Arduino\mjs3-Arduino)
10
-
- Load the sketch using the Arduino IDE menu (File->Sketchbook->mjs3-Arduino)
11
-
- Build and Upload (*note: currently does not build on AVR platforms)
9
+
- Download the latest github release zip file [ESP8266-Arduino-JavaScript-0.0.12](https://github.com/sfranzyshen/ESP8266-Arduino-JavaScript/releases/download/0.0.12/ESP8266-Arduino-JavaScript-0.0.12.zip)
10
+
- In the Arduino IDE, navigate to Sketch > Include Library > Add .ZIP Library. At the top of the drop down list, select the option to "Add .ZIP Library''.
11
+
- You will be prompted to select the library you would like to add. Navigate to the .zip file's location and open it.
12
+
- Load the demo sketch using the Arduino IDE menu (File->Examples->ESP8266-Arduino-JavaScript->blink)
13
+
- Build and Upload.
12
14
13
15
## Features
14
16
@@ -28,11 +30,10 @@ mJS3 is a single-source-file JavaScript engine for Arduino IDE microcontrollers.
28
30
- mJS VM executes JS source directly, no AST/bytecode is generated
29
31
- Simple FFI API to inject existing C functions into JS
30
32
31
-
## Example - blinky in JavaScript on Arduino Platform
33
+
## Example - blink in JavaScript on Arduino IDE ESP8266 Platform
32
34
33
35
```c++
34
-
#defineMJS_STRING_POOL_SIZE 200 // Buffer for all strings
35
-
#include "mjs3-Arduino.c"
36
+
#include<mjs3.h>
36
37
37
38
externvoidmyDelay(int x) {
38
39
delay(x);
@@ -59,8 +60,8 @@ void loop() {
59
60
```
60
61
61
62
```
62
-
Sketch uses 272668 bytes (26%) of program storage space. Maximum is 1044464 bytes.
63
-
Global variables use 27812 bytes (33%) of dynamic memory, leaving 54108 bytes for local variables. Maximum is 81920 bytes.
63
+
Sketch uses 271568 bytes (26%) of program storage space. Maximum is 1044464 bytes.
64
+
Global variables use 27828 bytes (33%) of dynamic memory, leaving 54092 bytes for local variables. Maximum is 81920 bytes.
0 commit comments