File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change
1
+ MicroPython.js
2
+ ==============
3
+
4
+ MicroPython transmuted into Javascript (WASM) by Emscripten.
5
+
6
+ Running with Node.js
7
+ --------------------
8
+
9
+ ``` javascript
10
+ var mp_js = require (' micropython' );
11
+
12
+ mp_js .init (64 * 1024 );
13
+ mp_js .do_str (" print('hello world')\n " );
14
+ ```
15
+
16
+ Running with Webpack
17
+ -----------------
18
+ TODO
19
+
20
+ API
21
+ ---
22
+
23
+ The following functions have been exposed to javascript.
24
+
25
+ ```
26
+ init(stack_size)
27
+ ```
28
+
29
+ Initialize MicroPython with the given stack size in bytes. This must be
30
+ called before attempting to interact with MicroPython.
31
+
32
+ ```
33
+ do_str(code)
34
+ ```
35
+
36
+ Execute the input code. ` code ` must be a ` string ` .
37
+
38
+ ```
39
+ init_repl()
40
+ ```
41
+
42
+ Initialize MicroPython repl. Must be called before entering characters into
43
+ the repl.
44
+
45
+ ```
46
+ process_char(char)
47
+ ```
48
+
49
+ Input character into MicroPython repl. ` char ` must be of type ` number ` . This
50
+ will execute MicroPython code when necessary.
You can’t perform that action at this time.
0 commit comments