File tree Expand file tree Collapse file tree 5 files changed +21735
-21697
lines changed Expand file tree Collapse file tree 5 files changed +21735
-21697
lines changed Original file line number Diff line number Diff line change
1
+ 1.1.2
2
+ -----
3
+
4
+ * Updated MicroPython to 1.0.1 release
5
+ * Updated README with migration documentation
6
+
1
7
1.1.1
2
8
-----
3
9
Original file line number Diff line number Diff line change @@ -136,6 +136,29 @@ relatively small when you consider:
136
136
* The web has caching built in (we should trust it)
137
137
* We actually want kids to view source and find the .hex file in as raw a form as possible.
138
138
139
+ Importing Projects
140
+ ++++++++++++++++++
141
+ Python projects from external sources can be imported into the editor using a special URL e.g.
142
+ ``https://python.microbit.org/v/1.1#project:{{ encoded project }} ``
143
+
144
+ To encode a project, it must be structured as follows:
145
+
146
+ ::
147
+
148
+ {
149
+ meta: {
150
+ cloudId: "microbit.co.uk", # optional
151
+ comment: "A MicroPython script", # required - may be blank
152
+ editor: "python", # required - editor name
153
+ lastUse: 1538407830, # optional - UNIX time the script was last used
154
+ name: "unearthly script 2" # required - may be blank
155
+ },
156
+ source: "# Add your Python code here. E.g.\r\n from microbit import *\r\n while True:\r\n display.scroll('Hello, World!')\r\nsleep(2000)"
157
+ }
158
+
159
+ This JSON structure is compressed using `LZMA
160
+ <https://github.com/LZMA-JS/LZMA-JS> `_, and then encoded as Base64 to include in the import URL.
161
+
139
162
Configuration
140
163
-------------
141
164
You can’t perform that action at this time.
0 commit comments