/
help.html
120 lines (103 loc) · 5.1 KB
/
help.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="static/img/favicon.ico">
<title>Python on the BBC micro:bit</title>
<!-- Bootstrap core CSS -->
<link href="static/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="static/css/starter-template.css" rel="stylesheet">
<link href="static/css/highlight.min.css" rel="stylesheet">
<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
<!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
<script src="static/js/ie-emulation-modes-warning.js"></script>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
:q <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#top">Python on the micro:bit</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="#top">Start Here</a></li>
<li><a href="#code">Hack Code</a></li>
<li><a href="#connect">Connect</a></li>
<li><a href="#hacks">Fun Hacks</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<div class="container">
<div class="starter-template">
<div class="row" id="home">
<div class="col-md-4 col-md-offset-4">
<a href="http://micropython.org"><img src="static/img/micropython.jpeg"/></a><a href="http://python.org/"><img src="static/img/python.png"/></a><br/><br/>
<img src="static/img/microbit.png"/><br/><br/>
</div>
</div>
<h1>Be brave! Break things! Learn and have fun!</h1>
</div>
<h2 id="start">Start Here</h2>
<p>This is a very high level overview of Python, MicroPython, the micro:bit
and the general modus operandi.</p>
<p>Some example Python code:</p>
<pre><code class="python">import microbit
fortunes = [
"Never step off a moving bus",
"This sentence is false",
"The meaning of life is overrated",
"Do not touch!",
"You will receive some advice",
"My hovercraft is full of eels",
]
while True:
if microbit.button_a.is_pressed():
i = microbit.random(len(fortunes))
cookie = fortunes[i]
microbit.display.scroll(cookie)</code></pre>
<p>More stylistic conventions as follows:</p>
<p>This is some <code>embedded code</code> within a sentence.</p>
<p>This is an example of <kbd>user input</code> in a sentence.</p>
<p>Variables look like this: <var>wibble</var> = <var>x</var> + 1</p>
<h2 id="code">Hack Code</h2>
<p>How to use an editor (dealing with both online and offline modes) and
flash the device.</p>
<h2 id="connect">Connect</h2>
<p>Connect to the REPL. Speak parseltongue!</p>
<h2 id="hacks">Fun Hacks</h2>
<p>Demonstration scripts that do funky things on the micro:bit.</p>
<footer style="text-align: center; margin-top: 64px;">
<p>
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="Creative Commons Licence" style="border-width:0" src="static/img/80x15.png" /></a> This work by <a xmlns:cc="http://creativecommons.org/ns#" href="http://python.org/psf" property="cc:attributionName" rel="cc:attributionURL">The Python Software Foundation</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>.
</p>
</footer>
</div><!-- /.container -->
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="static/js/jquery-2.1.4.min.js"></script>
<script src="static/js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="static/js/ie10-viewport-bug-workaround.js"></script>
<script src="static/js/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</body>
</html>