Compare commits

...

110 Commits

Author SHA1 Message Date
9319f10430 0.5.3 2016-10-11 11:43:38 -07:00
c4787e1028 support for rgb led in simulator 2016-10-11 11:41:51 -07:00
cb280af783 fix json in libs/hello 2016-10-11 10:13:30 -07:00
4201cb3070 0.5.2 2016-10-11 09:34:26 -07:00
ec7bade8f4 missed file in previous move 2016-10-11 09:21:24 -07:00
d738d8bbf5 0.5.1 2016-10-11 09:14:47 -07:00
a8b1e0bc04 bumping version number 2016-10-11 09:14:32 -07:00
114b7958bc 0.4.32 2016-10-11 09:13:05 -07:00
f45ae5950c 0.4.31 2016-10-11 09:09:25 -07:00
4cdfaf06c0 0.4.30 2016-10-11 09:08:41 -07:00
d48404eb37 integrated pxt-microbit 2016-10-11 09:08:31 -07:00
f4ac599ec2 Bump pxt-core to 0.4.51 2016-10-11 09:05:10 -07:00
a783cdda92 0.4.29 2016-10-11 13:33:35 +02:00
5900c8c9f5 update dependency 2016-10-11 13:32:42 +02:00
e1e8eab93f 0.4.43 2016-10-10 22:10:45 -07:00
dface9083f Bump pxt-core to 0.4.51 2016-10-10 22:10:43 -07:00
31d4afc897 0.4.42 2016-10-10 17:45:43 -07:00
8427e89eb6 updating to pxt 0.4.50 2016-10-10 16:31:47 -07:00
277d5a721c rename "microbit" package to "core" #414 (#270)
* rename "microbit" package to "core" #414

* shouldn't edit the package id.

* updating package.json

* updated the wrong version

* missed updating pxt.json of tests
2016-10-10 16:21:50 -07:00
3911c6522d integrate pxt-microbit changes 2016-10-10 14:43:33 -07:00
00cdb6f9f5 0.4.28 2016-10-10 13:35:54 -07:00
df14445320 updated travis file 2016-10-10 13:34:24 -07:00
553b692a9a 0.4.27 2016-10-10 13:19:17 -07:00
7f2fd0dd09 positioning systemled 2016-10-10 13:16:39 -07:00
ae6917c7b3 0.4.26 2016-10-10 13:03:20 -07:00
5c1d9a342b updated to core v0.5.4 2016-10-10 13:03:08 -07:00
d41724d239 0.4.25 2016-10-10 12:58:42 -07:00
d6a006d18f Bump pxt-core to 0.4.48 2016-10-10 11:25:24 -07:00
cace68acf4 updated hello sample 2016-10-10 11:20:25 -07:00
80131f2928 updated tilt tempo video 2016-10-10 11:04:00 -07:00
51bd8d57aa updated raspbian docs 2016-10-09 21:50:13 -07:00
68ef7c2fc2 fix initialization of Accelerometer (delayed in uBit.init()), enable DAL debugging 2016-10-08 15:15:01 +02:00
4c502f0825 bump pxt-calliope-core dependency 2016-10-08 12:23:29 +02:00
acd974b964 0.4.41 2016-10-07 18:20:56 -07:00
04e0529610 disabling embed 2016-10-07 18:20:42 -07:00
ee3f2e6470 0.4.40 2016-10-07 14:46:24 -07:00
29a4f3cf69 Bump pxt-core to 0.4.48 2016-10-07 14:46:22 -07:00
a2f1cef9ae Merge branch 'master' of github.com:Microsoft/pxt-calliope 2016-10-07 11:39:31 -07:00
e857a94e04 0.4.24 2016-10-07 18:48:34 +02:00
5649495a28 0.4.39 2016-10-07 09:22:29 -07:00
a8a9d7dcf0 Bump pxt-core to 0.4.47 2016-10-07 09:22:27 -07:00
09d7ebaf78 storing target id, version if available 2016-10-07 09:19:14 -07:00
5c6b4c454b 0.4.38 2016-10-07 02:53:34 -07:00
7e1408fc12 Bump pxt-core to 0.4.46 2016-10-07 02:53:32 -07:00
09dc67717c added nickname / github search flag 2016-10-07 02:53:18 -07:00
20dcd5ce34 0.4.37 2016-10-05 17:17:12 -07:00
e092961b5b Bump pxt-core to 0.4.45 2016-10-05 17:17:11 -07:00
28044af979 merge 2016-10-05 17:16:58 -07:00
a9ba0a8f90 adding sharing flags 2016-10-05 17:14:49 -07:00
871694f99f 0.4.36 2016-10-05 15:17:45 -07:00
8f6c81cd53 Bump pxt-core to 0.4.44 2016-10-05 15:17:44 -07:00
c819b815c4 adding sharing flag to pxtarget.json 2016-10-05 15:17:16 -07:00
a714970344 0.4.35 2016-10-04 08:42:57 -07:00
77df714a08 Bump pxt-core to 0.4.42 2016-10-04 08:42:57 -07:00
693a6ba8a9 Remove 3 converter tests with overflowing numbers 2016-10-04 08:20:30 -07:00
5a8122bc8a 0.4.34 2016-10-03 22:35:53 -07:00
c382fc5050 Bump pxt-core to 0.4.41 2016-10-03 22:35:51 -07:00
d69a82d167 updated telegraph project 2016-10-03 22:32:27 -07:00
a30ca46fef merging changes 2016-10-03 22:23:01 -07:00
a56226c08d updated hack-your-headphone lesson 2016-10-03 22:21:36 -07:00
87d34ba030 restructed banana lesson 2016-10-03 19:07:54 -07:00
091917b765 removed linking between projects 2016-10-03 18:55:09 -07:00
42a93a1682 updated accent color 2016-10-03 18:54:07 -07:00
aea09c1830 Minor fixes to guitar demo 2016-10-03 16:37:46 -07:00
5e9eec61c5 Reject promise when deploy to board fails (#267)
* Reject promise when deploy to board fails

* Change var to let
2016-10-03 15:26:41 -07:00
a34f765681 adding guitar to project list 2016-10-03 15:18:20 -07:00
2ae78fe6b8 Updated guitar lessons (#268)
* initial notes

* updated code samples

* splitting the page and preparing layout

* missing gamepad api

* added basic guitar activty md files

added initial draft of guitar lesson - in progress

* word smithing and adding detail for concepts listed

* word smithing and adding detail for concepts listed

* typo in file name

* missing macro

* replaced guitar.png with image from Julia Carlson

* adding a few pictures

* adding cards macros

* few tweaks

* image for accellerometer lesson xyz axis

* fixed the numbering buttons page
-fixed the numbering to restart for each section and asdded spaces after so they don't wrap

* adding a few video links

* pin-press - added circuit info

* more vids

* fixing latest commit

* edits to light sensor and pin-press

* updated descriptions, linking lesson

* pin-press and display-buttons updates
-added dode samples to pin press

* updated making video

* light-sensor updated numbering

* Clean up
Clean up of headings to template style, other fixes

* putting display in template
use h2 with "Step 1:" and image before text

* removed numbered lists for display & light
these topics are code complete

* more consistent formating
Acceleromenter, buttons, light sensosr

* Acceleration Lesson, added art
Lesson steps for Acceleration, art for degree F to C for Map anology+clean up of light sensor topic

* Pin Press code complete
some other basic fomats and edits

* Removed dashes in lesson names
renamed and fixed references to files with "-" in names

* rest of fles w/ dash in name changes

* fixed links to guitar activities

* updated acceleraomter section

* transparency 4 art, image text
added transarency and renamed art, added descriptive text for video and still images

* renamed art

* fixing the merge

* fixing hint

* moved step 2 outside ~hint block

* fixing snippets

* remove guitar from project list

* Duration/Materials consistent  format
moved out of ~avatar block
2016-10-03 14:59:58 -07:00
e983c76e2f Remove unneeded tests 2016-10-03 11:15:49 -07:00
ced4565d5c 0.4.23 2016-10-01 15:52:41 -07:00
2475058b94 0.4.22 2016-10-01 15:45:43 -07:00
c6ee0db81c Bump pxt-core to 0.4.39 2016-10-01 15:45:41 -07:00
1b96e6332a 0.4.21 2016-10-01 21:02:36 +02:00
1ceec1d3b4 0.4.20 2016-10-01 20:59:44 +02:00
33207f33e5 0.4.33 2016-09-30 22:08:18 -07:00
a487e102ef Bump pxt-core to 0.4.39 2016-09-30 22:08:16 -07:00
a6ffa99ceb 0.4.32 2016-09-30 21:51:56 -07:00
d2aa02c259 Bump pxt-core to 0.4.37 2016-09-30 21:51:54 -07:00
563d76b90a 0.4.31 2016-09-30 10:56:30 -07:00
b433585403 disable persistence of cookies 2016-09-30 10:56:11 -07:00
576f37171a 0.4.30 2016-09-30 08:29:54 -07:00
0bd92a433d Bump pxt-core to 0.4.36 2016-09-30 08:29:52 -07:00
2d5f3421ba updated docs page tracking 2016-09-30 08:29:44 -07:00
7956c6e6a1 disable persistence when initializig mix panel 2016-09-30 08:14:13 -07:00
1f7a56a451 0.4.29 2016-09-29 22:46:54 -07:00
0ea4583b20 fix typo in tracking 2016-09-29 22:45:55 -07:00
4bccb435f7 0.4.28 2016-09-29 22:35:06 -07:00
749c2111d2 disaable user-voice, disable cookies in mixpanel 2016-09-29 22:31:10 -07:00
96991447f8 0.4.27 2016-09-29 22:15:19 -07:00
22f36a623b Bump pxt-core to 0.4.35 2016-09-29 22:15:17 -07:00
8a47793f48 reorg lesson 2016-09-29 22:15:04 -07:00
5cfedf7343 0.4.26 2016-09-29 08:32:27 -07:00
13383e6232 adding sketeches 2016-09-29 08:32:15 -07:00
165cd0c67e Merge branch 'master' of https://github.com/Microsoft/pxt-microbit 2016-09-29 08:16:14 -07:00
9c8886116e fix for microsoft/pxt#396 2016-09-29 08:15:58 -07:00
fc495b928e Implement getPinAddress in simulator 2016-09-29 10:47:50 +01:00
17644d4947 0.4.25 2016-09-28 22:36:26 -07:00
068ea80a45 Merge branch 'master' of https://github.com/Microsoft/pxt-microbit 2016-09-28 22:36:04 -07:00
7a86bbd6b9 Timingate (#265)
* draft lesson

* basic timing gates lesson
2016-09-28 22:35:53 -07:00
78fffe0e01 typos 2016-09-28 19:24:43 -07:00
7bf1a29c83 0.4.24 2016-09-28 18:08:18 -07:00
446ef4d7b7 Bump pxt-core to 0.4.33 2016-09-28 18:08:14 -07:00
ca3e3a43a5 0.4.23 2016-09-28 17:05:17 -07:00
2225be7af1 added org info 2016-09-28 15:25:58 -07:00
1ce863df96 0.4.22 2016-09-28 11:55:00 -07:00
68ae9864a9 Bump pxt-core to 0.4.32 2016-09-28 11:54:57 -07:00
8cd670b22a 0.4.21 2016-09-28 00:29:43 -07:00
a36038a048 Bump pxt-core to 0.4.30 2016-09-28 00:29:39 -07:00
9d4b31fe4d updated share docs 2016-09-28 00:29:27 -07:00
3ea6d1e6bb 0.4.20 2016-09-27 18:11:07 -07:00
1698c4a012 Bump pxt-core to 0.4.27 2016-09-27 18:11:06 -07:00
123 changed files with 875 additions and 1199 deletions

View File

@ -3,17 +3,12 @@ node_js:
- "5.7.0"
script:
- "node node_modules/pxt-core/built/pxt.js travis"
- "(cd libs/lang-test0; node ../../node_modules/pxt-core/built/pxt.js run)"
- "(cd libs/lang-test1; node ../../node_modules/pxt-core/built/pxt.js run)"
- "(cd libs/lang-test0; node ../../node_modules/pxt-core/built/pxt.js test)"
- "(cd libs/lang-test1; node ../../node_modules/pxt-core/built/pxt.js test)"
- "node node_modules/pxt-core/built/pxt.js testdir tests"
- "node node_modules/pxt-core/built/pxt.js uploaddoc"
- "(cd libs/hello; node ../../node_modules/pxt-core/built/pxt.js testconv https://az851932.vo.msecnd.net/files/td-converter-tests-v0.json)"
sudo: false
notifications:
email:
- touchdevelop-build@microsoft.com
- kindscript@microsoft.com
cache:
directories:
- node_modules

View File

@ -16,5 +16,6 @@
"**/pxt_modules/**": true
},
"tslint.enable": true,
"tslint.rulesDirectory": "node_modules/tslint-microsoft-contrib"
"tslint.rulesDirectory": "node_modules/tslint-microsoft-contrib",
"typescript.tsdk": "./node_modules/typescript/lib"
}

View File

@ -13,10 +13,13 @@ export function deployCoreAsync(res: ts.pxtc.CompileResult) {
return getBitDrivesAsync()
.then(drives => {
if (drives.length == 0) {
console.log("cannot find any drives to deploy to")
} else {
console.log(`copy ${ts.pxtc.BINARY_HEX} to ` + drives.join(", "))
let msg = "cannot find any drives to deploy to";
console.log(msg);
return Promise.reject(new Error(msg));
}
console.log(`copy ${ts.pxtc.BINARY_HEX} to ` + drives.join(", "))
return Promise.map(drives, d =>
writeFileAsync(d + ts.pxtc.BINARY_HEX, res.outfiles[ts.pxtc.BINARY_HEX])
.then(() => {

View File

@ -1,13 +1,6 @@
<script type="text/javascript">
var appInsights=window.appInsights||function(config){
function r(config){t[config]=function(){var i=arguments;t.queue.push(function(){t[config].apply(t,i)})}}var t={config:config},u=document,e=window,o="script",s=u.createElement(o),i,f;for(s.src=config.url||"//az416426.vo.msecnd.net/scripts/a/ai.0.js",u.getElementsByTagName(o)[0].parentNode.appendChild(s),t.cookie=u.cookie,t.queue=[],i=["Event","Exception","Metric","PageView","Trace"];i.length;)r("track"+i.pop());return r("setAuthenticatedUserContext"),r("clearAuthenticatedUserContext"),config.disableExceptionTracking||(i="onerror",r("_"+i),f=e[i],e[i]=function(config,r,u,e,o){var s=f&&f(config,r,u,e,o);return s!==!0&&t["_"+i](config,r,u,e,o),s}),t
}({
instrumentationKey:"e9ae05ca-350b-427a-9775-3ba3f6efabce"
});window.appInsights=appInsights;
</script>
<script type="text/javascript">
(function(e,b){if(!b.__SV){var a,f,i,g;window.mixpanel=b;b._i=[];b.init=function(a,e,d){function f(b,h){var a=h.split(".");2==a.length&&(b=b[a[0]],h=a[1]);b[h]=function(){b.push([h].concat(Array.prototype.slice.call(arguments,0)))}}var c=b;"undefined"!==typeof d?c=b[d]=[]:d="mixpanel";c.people=c.people||[];c.toString=function(b){var a="mixpanel";"mixpanel"!==d&&(a+="."+d);b||(a+=" (stub)");return a};c.people.toString=function(){return c.toString(1)+".people (stub)"};i="disable time_event track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config reset people.set people.set_once people.increment people.append people.union people.track_charge people.clear_charges people.delete_user".split(" ");
for(g=0;g<i.length;g++)f(c,i[g]);b._i.push([a,e,d])};b.__SV=1.2;a=e.createElement("script");a.type="text/javascript";a.async=!0;a.src="undefined"!==typeof MIXPANEL_CUSTOM_LIB_URL?MIXPANEL_CUSTOM_LIB_URL:"file:"===e.location.protocol&&"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js".match(/^\/\//)?"https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js":"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js";f=e.getElementsByTagName("script")[0];f.parentNode.insertBefore(a,f)}})(document,window.mixpanel||[]);
mixpanel.init("762fef19c053a0ea4cec43d2fecae76e");
mixpanel.init("762fef19c053a0ea4cec43d2fecae76e", { disable_persistence: true });
if (pxtConfig) mixpanel.register({ target: pxtConfig.targetId, version: pxtConfig.targetVersion });
</script>

View File

@ -1,13 +1,6 @@
<script type="text/javascript">
var appInsights=window.appInsights||function(config){
function r(config){t[config]=function(){var i=arguments;t.queue.push(function(){t[config].apply(t,i)})}}var t={config:config},u=document,e=window,o="script",s=u.createElement(o),i,f;for(s.src=config.url||"//az416426.vo.msecnd.net/scripts/a/ai.0.js",u.getElementsByTagName(o)[0].parentNode.appendChild(s),t.cookie=u.cookie,t.queue=[],i=["Event","Exception","Metric","PageView","Trace"];i.length;)r("track"+i.pop());return r("setAuthenticatedUserContext"),r("clearAuthenticatedUserContext"),config.disableExceptionTracking||(i="onerror",r("_"+i),f=e[i],e[i]=function(config,r,u,e,o){var s=f&&f(config,r,u,e,o);return s!==!0&&t["_"+i](config,r,u,e,o),s}),t
}({
instrumentationKey:"e9ae05ca-350b-427a-9775-3ba3f6efabce"
});window.appInsights=appInsights;
</script>
<script type="text/javascript">
(function(e,b){if(!b.__SV){var a,f,i,g;window.mixpanel=b;b._i=[];b.init=function(a,e,d){function f(b,h){var a=h.split(".");2==a.length&&(b=b[a[0]],h=a[1]);b[h]=function(){b.push([h].concat(Array.prototype.slice.call(arguments,0)))}}var c=b;"undefined"!==typeof d?c=b[d]=[]:d="mixpanel";c.people=c.people||[];c.toString=function(b){var a="mixpanel";"mixpanel"!==d&&(a+="."+d);b||(a+=" (stub)");return a};c.people.toString=function(){return c.toString(1)+".people (stub)"};i="disable time_event track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config reset people.set people.set_once people.increment people.append people.union people.track_charge people.clear_charges people.delete_user".split(" ");
for(g=0;g<i.length;g++)f(c,i[g]);b._i.push([a,e,d])};b.__SV=1.2;a=e.createElement("script");a.type="text/javascript";a.async=!0;a.src="undefined"!==typeof MIXPANEL_CUSTOM_LIB_URL?MIXPANEL_CUSTOM_LIB_URL:"file:"===e.location.protocol&&"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js".match(/^\/\//)?"https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js":"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js";f=e.getElementsByTagName("script")[0];f.parentNode.insertBefore(a,f)}})(document,window.mixpanel||[]);
mixpanel.init("762fef19c053a0ea4cec43d2fecae76e");
mixpanel.init("762fef19c053a0ea4cec43d2fecae76e", { disable_persistence: true });
if (pxtConfig) mixpanel.register({ target: pxtConfig.targetId, version: pxtConfig.targetVersion });
</script>

View File

@ -13,14 +13,8 @@ Music
## Prior learning/place of lesson in scheme of work
Learn how to convert your BBC micro:bit into a music player using pins P0 and GND, earphones (or speakers), as well as crocodile clips (or spring clips). We will be learning how to code musical notes using simple commands such as play, keys, and notes.
## What the teacher needs to know / QuickStart Computing Glossary
* Hardware: The physical systems and components of digital devices; see also software.
* Programmable toys: Robots designed for children to use, accepting input, storing short sequences of simple instructions and moving according to this stored program.
* Program: A stored set of instructions encoded in a language understood by the computer that does some form of computation, processing input and/or stored data to generate output.
* Simulation: Using a computer to model the state and behaviour of real-world (or imaginary) systems, including physical or social systems; an integral part of most computer games.
Learn how to convert your BBC micro:bit into a music player using pins P0 and GND, earphones (or speakers), as well as crocodile clips (or spring clips).
We will be learning how to code musical notes using simple commands such as play, keys, and notes.
## Objectives

View File

@ -1,7 +1,5 @@
# hero
make a game to test hand-eye coordination.
Make a game to test hand-eye coordination
* [activity](/lessons/hero/activity)

View File

@ -2,6 +2,9 @@
Here are some cool projects that you can build with your micro:bit!
## Games
Fun games to build with your micro:bit.
```codecard
[{
@ -20,18 +23,42 @@ Here are some cool projects that you can build with your micro:bit!
"name": "Rock Paper Scissors",
"url":"/projects/rock-paper-scissors",
"imageUrl":"/static/mb/projects/a4-motion.png"
},{
"name": "Compass",
"url":"/projects/compass",
"imageUrl":"/static/mb/projects/a5-compass.png"
},{
}]
```
## Maker, Arts, Fashion
```codecard
[{
"name": "Hack your headphones",
"url":"/projects/hack-your-headphones",
"imageUrl":"/static/mb/projects/a6-music.png"
},{
}, {
"name": "Banana keyboard",
"url":"/projects/banana-keyboard",
"imageUrl":"/static/mb/projects/a7-conductive.png"
}, {
"name": "Guitar",
"url":"/projects/guitar",
"imageUrl":"/static/mb/projects/guitar.png"
}, {
"name": "Watch",
"url":"/projects/the-watch",
"imageUrl":"/static/mb/projects/a10-watch.png"
}, {
"name": "Timing gates",
"url":"/projects/timing-gates",
"imageUrl":"/static/mb/projects/timing-gates.jpg"
}]
```
## More
```codecard
[{
"name": "Compass",
"url":"/projects/compass",
"imageUrl":"/static/mb/projects/a5-compass.png"
},{
"name": "Telegraph",
"url":"/projects/telegraph",
@ -40,13 +67,9 @@ Here are some cool projects that you can build with your micro:bit!
"name": "Radio",
"url":"/projects/radio",
"imageUrl":"/static/mb/projects/a9-radio.png"
},{
"name": "Watch",
"url":"/projects/the-watch",
"imageUrl":"/static/mb/projects/a10-watch.png"
}]
```
### See Also
[Flashing Heart](/projects/flashing-heart), [Smiley Buttons](/projects/smiley-buttons), [Love Meter](/projects/love-meter), [Rock Paper Scissors](/projects/rock-paper-scissors), [Compass](/projects/compass), [Hack your headphones](/projects/hack-your-headphones), [Banana keyboard](/projects/banana-keyboard), [Telegraph](/projects/telegraph), [Radio](/projects/radio), [Watch](/projects/the-watch)
[Flashing Heart](/projects/flashing-heart), [Smiley Buttons](/projects/smiley-buttons), [Love Meter](/projects/love-meter), [Rock Paper Scissors](/projects/rock-paper-scissors), [Compass](/projects/compass), [Hack your headphones](/projects/hack-your-headphones), [Banana keyboard](/projects/banana-keyboard), [Telegraph](/projects/telegraph), [Radio](/projects/radio), [Guitar](/projects/guitar), [Watch](/projects/the-watch)

View File

@ -1,12 +1,16 @@
# banana keyboard activity
# banana keyboard
build a banana keyboard
### @description A beginner maker activity, building a piano from bananas.
# micro:bit banana keyboard
### ~avatar
Build your own micro:bit piano using bananas!
### ~
![](/static/mb/lessons/banana-keyboard-0.png)
In this project, you will build your own music player micro:bit banana keyboard from household fruit. Project duration: 15 minutes.
## Duration: ~20 minutes.
## Materials
@ -15,86 +19,11 @@ In this project, you will build your own music player micro:bit banana keyboard
* Orange
* Crocodile clips
## Steps
## Activities
### Step 1
![](/static/mb/lessons/banana-keyboard-1.png)
Using the 1st crocodile clip, connect the end of the crocodile clip onto GND pin on the micro:bit.
### Step 2
![](/static/mb/lessons/banana-keyboard-2.png)
![](/static/mb/lessons/banana-keyboard-3.png)
Using the 2nd crocodile clip, connect the end of the crocodile clip onto the 0 pin on the micro:bit.
### Step 3
![](/static/mb/lessons/banana-keyboard-4.png)
Using the 1st crocodile clip, connect the second end of the crocodile clip onto based of the headphone jack.
### Step 4
![](/static/mb/lessons/banana-keyboard-5.png)
![](/static/mb/lessons/banana-keyboard-6.png)
Using the 2nd crocodile clip, connect the second end of the crocodile clip onto tip of the headphone jack.
### Step 5
![](/static/mb/lessons/banana-keyboard-7.png)
Using the 3rd crocodile clip, connect the end of the crocodile clip onto the 1st crocodile clip already clipped onto GND.
### Step 6
![](/static/mb/lessons/banana-keyboard-8.png)
![](/static/mb/lessons/banana-keyboard-9.png)
Using the 3rd crocodile clip, connect the unattached end of the crocodile clip onto the orange.
### Step 7
![](/static/mb/lessons/banana-keyboard-10.png)
Using the 4th crocodile clip, connect the end of the crocodile clip onto pin 1 on the micro:bit.
### Step 8
![](/static/mb/lessons/banana-keyboard-11.png)
Using the 4th crocodile clip, connect the unattached end of the crocodile clip onto the banana.
### Step 9
![](/static/mb/lessons/banana-keyboard-12.png)
Your banana keyboard is ready!
### Step 10
Connect your micro:bit to your computer using your USB cable and run this script:
```blocks
let sound = music.noteFrequency(Note.C);
input.onPinPressed(TouchPin.P1, () => {
for (let i = 0; i < 5; i++) {
sound = sound + 25;
music.playTone(sound, music.beat(BeatFraction.Sixteenth));
}
});
```
Tap your banana instrument to play sound against... the fruit!
### ~avatar boothing
Excellent, you're ready to continue with the [challenges](/projects/banana-keyboard-challenges)!
* [Making the keyboard](/projects/banana-keyboard/making)
* [Beat box](/projects/banana-keyboard/beat-box)
### ~button /projects/banana-keyboard/making
Let's get started!
### ~

View File

@ -1,10 +1,4 @@
# banana keyboard blocks challenges
control images with variables.
## Before we get started
Control images with variables.
# banana keyboard - beat box
Have you ever tried to making beat box sounds? Let's try making a beatbox with code!
@ -35,7 +29,7 @@ input.onPinPressed(TouchPin.P1, () => {
```
* click *run* to see if the code works as expected.
* click *Download* to see if the code works as expected.
@ -57,8 +51,4 @@ input.onPinPressed(TouchPin.P2, () => {
})
```
* click *run* to see if the code works as expected.
### ~button /projects/telegraph
NEXT: Telegraph
### ~
* click *Download* to see if the code works as expected.

View File

@ -0,0 +1,85 @@
# banana keyboard - making
## Materials
* micro:bit, battery holder and 2 AAA batteries
* Bananas
* Orange
* Crocodile clips
## Steps
### Step 1
![](/static/mb/lessons/banana-keyboard-1.png)
Using the 1st crocodile clip, connect the end of the crocodile clip onto GND pin on the micro:bit.
### Step 2
![](/static/mb/lessons/banana-keyboard-2.png)
![](/static/mb/lessons/banana-keyboard-3.png)
Using the 2nd crocodile clip, connect the end of the crocodile clip onto the 0 pin on the micro:bit.
### Step 3
![](/static/mb/lessons/banana-keyboard-4.png)
Using the 1st crocodile clip, connect the second end of the crocodile clip onto based of the headphone jack.
### Step 4
![](/static/mb/lessons/banana-keyboard-5.png)
![](/static/mb/lessons/banana-keyboard-6.png)
Using the 2nd crocodile clip, connect the second end of the crocodile clip onto tip of the headphone jack.
### Step 5
![](/static/mb/lessons/banana-keyboard-7.png)
Using the 3rd crocodile clip, connect the end of the crocodile clip onto the 1st crocodile clip already clipped onto GND.
### Step 6
![](/static/mb/lessons/banana-keyboard-8.png)
![](/static/mb/lessons/banana-keyboard-9.png)
Using the 3rd crocodile clip, connect the unattached end of the crocodile clip onto the orange.
### Step 7
![](/static/mb/lessons/banana-keyboard-10.png)
Using the 4th crocodile clip, connect the end of the crocodile clip onto pin 1 on the micro:bit.
### Step 8
![](/static/mb/lessons/banana-keyboard-11.png)
Using the 4th crocodile clip, connect the unattached end of the crocodile clip onto the banana.
### Step 9
![](/static/mb/lessons/banana-keyboard-12.png)
Your banana keyboard is ready!
### Step 10
Connect your micro:bit to your computer using your USB cable and run this script:
```blocks
input.onPinPressed(TouchPin.P1, () => {
music.playTone(music.noteFrequency(Note.C), music.beat(BeatFraction.Quarter));
});
```
Tap your banana instrument to play sound against... the fruit!
### ~button /projects/banana-keyboard/beat-box
NEXT: beat box
### ~

View File

@ -103,7 +103,3 @@ basic.forever(() => {
}
});
```
### ~button /projects/hack-your-headphones
NEXT: Hack Your Headphones
### ~

View File

@ -113,7 +113,3 @@ basic.clearScreen();
basic.pause(500);
})
```
### ~button /projects/smiley-buttons
NEXT: Smiley Buttons
### ~

View File

@ -1,10 +1,12 @@
# Guitar
![guitar icon](/static/mb/projects/guitar.png)
### @description A beginner-intermediate maker activity, building a guitar with the micro:bit
### ~avatar avatar
Make a micro:bit guitar with this guided tutorial!
Make a micro:bit guitar with this guided tutorial!
### ~
*playing micro:bit guitar*
@ -12,19 +14,21 @@ https://youtu.be/GYmdTFvxz80
## Duration
5 Activities, approx 30-45 min each based on familiarity with the coding concepts
5 Activities, approx 30-45 min each based on familiarity with the coding concepts
## Materials
* Cardboard large pieces (recycle!)
* Tape (masking, duct Tape, and/or packing tape)
* Tape (masking, duct tape, and/or packing tape)
* Markers and/or paint
* Aluminum Foil
* Scissors that can cut cardboard
* Scissors that can cut cardboard
* 1 micro:bit, battery holder and 2 AAA batteries
* 4-5 Crocodile clips
* Headphones
## Activities
* [Making the Guitar Body](/projects/guitar/making)
* [Buttons, Display & Sound](/projects/guitar/displaybuttons)
* [Light Sensor Tone control](/projects/guitar/lightsensor)
@ -32,5 +36,7 @@ https://youtu.be/GYmdTFvxz80
* [Pin Press Switch](/projects/guitar/pinpress)
### ~button /projects/guitar/making
Let's get started!
### ~

View File

@ -5,7 +5,6 @@
### ~avatar avatar
Use the Accelerometer to control guitar tempo
* Duration: 30 - 45 minutes
* Concepts:
* Gravity
* Acceleration
@ -18,9 +17,11 @@ Use the Accelerometer to control guitar tempo
### ~
## Duration: 30 - 45 minutes
*accelerometer controlled tempo*
https://youtu.be/h_gPkBaVkoo
TODO: add sound to video
https://youtu.be/kA0HpqCWsjs
## Blocks
```cards

View File

@ -2,7 +2,7 @@
### @description micro:bit guitar: using buttons with display and sound
### ~avatar avatar
Use Button Events to control LED Display and play Sound
Use Button Events to control LED Display and play Sound
* **Concepts:**
* Events
* Tone/Note
@ -42,8 +42,8 @@ music.rest(music.beat(BeatFraction.Whole))
music.beat(BeatFraction.Quarter)
```
## Step 1: Make a Smiley
Open [codethemicrobit.com](https://codethemicrobit.com) in your web browser
## Step 1: Make a Smiley
Open [codethemicrobit.com](https://codethemicrobit.com) in your web browser
```blocks
basic.showLeds(`
. # . # .
@ -53,14 +53,14 @@ Open [codethemicrobit.com](https://codethemicrobit.com) in your web browser
. # # # .
`);
```
From **Basics**, drag a **show LEDs** block into the coding area
* Create a face with LEDs
From **Basics**, drag a **show LEDs** block into the coding area
* Create a face with LEDs
![micro:bit USB connection](/static/mb/projects/guitar/connectmicrobit.jpg)
Connect your micro:bit to your computer via USB and click **`Download`**.
Follow the instructions to move the code to your micro:bit.
![micro:bit USB connection](/static/mb/projects/guitar/connectmicrobit.jpg)
Connect your micro:bit to your computer via USB and click **`Download`**.
Follow the instructions to move the code to your micro:bit.
## Step 2: Add Smiley LED Button Events
## Step 2: Add Smiley LED Button Events
```blocks
input.onButtonPressed(Button.A, () => {
basic.showLeds(`
@ -82,36 +82,36 @@ input.onButtonPressed(Button.B, () => {
})
```
From **Input**, drag an **on button 'A' pressed** block into the coding area
From **Input**, drag an **on button 'A' pressed** block into the coding area
* Snap the LED face into the block
* Snap the LED face into the block
* Create a 'B' button block with a different LED face
* Create a 'B' button block with a different LED face
* Download the code to your micro:bit and try the A & B buttons
* Download the code to your micro:bit and try the A & B buttons
## Step 3: Add Headphone Speakers using Crocodile clips
![crocodile clips attached to pins 0 and GND](/static/mb/projects/guitar/crocclipintoboard.jpg)
![crocodile clips attached to pins 0 and GND](/static/mb/projects/guitar/crocclipintoboard.jpg)
![crocodile clips attached to headphone jack](/static/mb/projects/guitar/jacktocrocs.jpg)
Connect **GND** to the **base of the headphone jack** using a second crocodile clip (usually black)
![crocodile clips attached to headphone jack](/static/mb/projects/guitar/jacktocrocs.jpg)
Connect **GND** to the **base of the headphone jack** using a second crocodile clip (usually black)
Connect **pin 0** to the **tip of the headphone jack** with a crocodile clip
Connect **pin 0** to the **tip of the headphone jack** with a crocodile clip
*attaching batteries and micro:bit*
https://youtu.be/zwRTmpKIaVU
Attach the micro:bit & battery-pack to the guitar body
*attaching batteries and micro:bit*
https://youtu.be/zwRTmpKIaVU
Attach the micro:bit & battery-pack to the guitar body
*connecting headphone speaker*
https://youtu.be/ewyEW_U5G9M
Connect the headphones with crocodile clips
*connecting headphone speaker*
https://youtu.be/ewyEW_U5G9M
Connect the headphones with crocodile clips
### ~hint
## The micro:bit can play music
The **play tone** block allows a range letter note tones from **C** to **B5**.
The **play tone** block allows a range letter note tones from **C** to **B5**.
Songs are played using sequences notes. Like the beginning of a birthday song (C, C, D, C, F, E).
```blocks
input.onButtonPressed(Button.A, () => {
@ -152,20 +152,20 @@ input.onButtonPressed(Button.B, () => {
`)
music.playTone(Note.G, music.beat(BeatFraction.Whole))
})
```
From **Music**, drag **play tone *C* for *1* beat** block under the **show leds** in **Button A Pressed**
```
From **Music**, drag **play tone *C* for *1* beat** block under the **show leds** in **Button A Pressed**
* modify **tone** by choosing a note (*letter*) and experiment with high and low pitches
* set **beat** to 1
**Repeat** for **Button B** event
**Download the code** to the micro:bit
* modify **tone** by choosing a note (*letter*) and experiment with high and low pitches
* set **beat** to 1
**Repeat** for **Button B** event
**Download the code** to the micro:bit
**Try the A & B buttons** with headphones and power connected
## Congratulations on completing the basic guitar!
**Challenge:** Create Samples of longer music to play for each button instead of the single tone
## Congratulations on completing the basic guitar!
**Challenge:** Create samples of longer music to play for each button instead of the single tone
* *Tip*: Search for "ABC music notation" or "Easy Music Notes" + the name of a song
## Extra

View File

@ -4,28 +4,27 @@
### ~avatar avatar
Use the Light Sensor to control guitar Tone
* **Duration:** 30 - 45 minutes
Use the Light Sensor to the control tone for this [Theremin](https://en.wikipedia.org/wiki/Theremin) inspired guitar
* **Concepts:**
* Inputs
* Light Intensity
* Tone/Frequency
* Ratio Mapping
* Forever Loop
* Math (multiplication) with code properties
* **Resources:**
* This guitar is inspired by the [Theremin](https://en.wikipedia.org/wiki/Theremin)
* Math (multiplication) with code properties
### ~
### ~
## Duration: 30 - 45 minutes
*playing tones with light sensor*
*playing tones with light sensor*
https://youtu.be/2cKg9pokVC4
## The micro:bit LEDs Light Sensors
## The micro:bit LEDs Light Sensors
- the micro:bit can detect external light level intensity reaching the LEDs
- the micro:bit can detect external light level intensity reaching the LEDs
- the light level block reports a reading of values 0 (*dark*) to 255 (*bright*)
- a **Forever Loop** is required to continually use measure the current light level to control the tone
- a **Forever Loop** is required to continually measure the current light level and control the tone
## Forever Loop
@ -47,70 +46,70 @@ basic.forever(() => {
})
```
**Build the blocks**
* From **Basic** drag a **forever loop** block into the coding area
* From **Led** drag a **plot bar graph** block into the **forever loop**
* From **Input** drag a **light level** block into **plot bar graph *of***
**Set the *plot bar graph* value *up to* = *255* **
* From **Basic** drag a **forever loop** block into the coding area
* From **Led** drag a **plot bar graph** block into the **forever loop**
* From **Input** drag a **light level** block into **plot bar graph *of***
## Step 2: Test the light required to move the bar graph height
**Set the *plot bar graph* value *up to* = *255* **
*graphing light input*
https://youtu.be/pqU7bTcfQ_s
Experiment to see the effect on graph height when the **plot bar graph** value ***up to*** is changed
## Step 2: Test the light required to move the bar graph height
**255 is the maximum light input reading**, try numbers smaller than 255
**Find a value** that allows the graph to show 1 - 5 bars
*graphing light input*
https://youtu.be/pqU7bTcfQ_s
Experiment to see the effect on graph height when the **plot bar graph** value ***up to*** is changed
**255 is the maximum light input reading**, try numbers smaller than 255
**Find a value** that allows the graph to show 1 - 5 bars
### ~hint
### Frequency
**Frequency** measured in Hz which are cycles per second or vibrations per second
* A healthy human ear can detect frequencies in the range of 20Hz to 20,000Hz.
* The micro:bit + headphones reliably produce detectable output ~50Hz - 6,000Hz.
### Frequency
**Frequency** measured in Hz which are cycles per second or vibrations per second
* A healthy human ear can detect frequencies in the range of 20Hz to 20,000Hz.
* The micro:bit + headphones reliably produce detectable output ~50Hz - 6,000Hz.
**261Hz** represents a C note
```blocks
music.playTone(261, music.beat(BeatFraction.Half))
```
**play tone** blocks can specify a specific numeric **Frequency**
by replacing the letter note 261Hz represents a **C** note with a **number** block
**play tone** blocks can specify a numeric **Frequency**
by replacing the letter **C** note with a **number** block that has the value it represents
```blocks
music.playTone(261, music.beat(BeatFraction.Half))
```
### ~
### ~
## Step 3: Multiply Frequency using Math blocks
```blocks
input.onButtonPressed(Button.A, () => {
music.playTone(261 * 2, music.beat(BeatFraction.Half))
})
```
create a **play tone** block using a **Math** section, **multiplication** block to set *tone*
```
Create a **play tone** block using a **Math** section, **multiplication** block to set *tone*
### Next
**Add** a **B** button block that multiplies the **261** tone by a number other than 2 to set tone
**Download the code to the micro:bit**
### Next
**Add** a **B** button block that multiplies the **261** tone by a number other than 2 to set tone
**Download the code to the micro:bit**
**Test the sound for multiples of the 261Hz *C* frequency**
**Test the sound for multiples of the 261Hz *C* frequency**
## Step 4: Control the Frequency with the light input
```blocks
basic.forever(() => {
music.playTone(input.lightLevel() * 25, music.beat(BeatFraction.Quarter))
})
```
**Create a *forever loop* containing a *play tone* block**
**Set *tone*, using *Math* multiplication block that multiplies *light level* input by 25**
or experiment with multipliers larger and smaller than 25
**Test light tone control on the guitar**
Cover the LEDs with your hand to vary light detected to control the tone
**Create a *forever loop* containing a *play tone* block**
**Set *tone*, using *Math* multiplication block that multiplies *light level* input by 25**
or experiment with multipliers larger and smaller than 25
**Test light tone control on the guitar**
Cover the LEDs with your hand to vary light detected to control the tone
## Good work, this guitar is sounding good!
**Challenge:** Create a variable for the light level multiplier that you can change using buttons (optional)
**Challenge:** Create a variable for the light level multiplier that you can change using buttons (optional)
### ~button /projects/guitar/accelerometer
NEXT: Accelerometer Beat control
### ~button /projects/guitar/accelerometer
NEXT: Accelerometer Beat control
### ~

View File

@ -1,5 +1,5 @@
# Making the Guitar Body
### @description Maker Project for Guitar Body for micro:bit
### @description Maker Project for Guitar Body for micro:bit
### ~avatar avatar
@ -11,9 +11,9 @@ Make the Guitar Body for your micro:bit Guitar
## Materials
* Cardboard large pieces (recycle!)
* Tape (masking, duct Tape, and/or packing tape)
* Scissors that can cut cardboard
* Markers and/or paint
* Tape (masking, duct tape, and/or packing tape)
* Scissors that can cut cardboard
* Markers and/or paint
![Materials: cardboard, tape, scissors, markers](/static/mb/projects/guitar/materials.jpg)
@ -28,7 +28,7 @@ the shape of your guitar
### ~hint
* Avoid small details that are difficult to cut into cardboard
* Unfolding a box gives longer pieces of cardboard, and creases can be reinforced
* Unfolding a box gives longer pieces of cardboard and creases can be reinforced
### ~
@ -39,21 +39,21 @@ https://youtu.be/aUQkrFoEank
## Step 3: Personalize the Guitar
Create unique styling using tape, markers, paint and other available materials (*calling all artist!*)
Create unique styles using tape, markers, paint and other available materials (*calling all artists!*)
*decorating the guitar*
https://youtu.be/zNAZTJeSxY8
Everyone can come up with a unique design!
Everyone can come up with a unique design!
![guitar design samples](/static/mb/projects/guitar/otherdesigns.jpg)
## Extra!
*strengthening the guitar*
*strengthening the guitar*
https://youtu.be/q0GkQdJmxjE
Strengthen the guitar next with an angled cardboard strip (*optional*).
Strengthen the guitar next with an angled cardboard strip (*optional*).
### ~button /projects/guitar/displaybuttons
NEXT: Buttons, Display and Sound
### ~

View File

@ -4,17 +4,20 @@
### ~avatar avatar
Use pin press to switch guitar play on/off
* **Duration:** approximately 45 minutes
* **Materials:**
* 2-3 Crocodile clips
* Concepts:
* Circuit
* Conductor
* Variable/Global-Variable
* Conditional: **`if`**, **`else`**
* Circuit
* Conductor
* Variable/Global-Variable
* Conditional: **`if`**, **`else`**
* Boolean: **`True`/`False`**
### ~
## Duration: approximately 45 minutes
## Materials:
2-3 Crocodile clips
## Blocks
```cards
@ -28,16 +31,16 @@ input.onPinPressed(TouchPin.P1, () => {})
### ~hint
## Circuits & Switches
* **Circuits** need a power supply (battery), a resister (like a LED) & a conductor (metal, water, hand)
* **Switches** turn electric power on by closing (completing) a circuit with a conductor so power can flow
* **Circuits** need a power supply (battery), a resister (like a LED) & a conductor (metal, water, hand)
* **Switches** turn electric power on by closing (completing) a circuit with a conductor so power can flow
**Metal foil and wires make excellent conductors**
**Metal foil and wires make excellent conductors**
**In this activity we use YOU to conduct electricity**
**to close the circuit that switches the guitar ON and OFF!**
**In this activity we use YOU to conduct electricity**
**to close the circuit that switches the guitar ON and OFF!**
### ~
## Step 1: Pin Press Test
## Step 1: Pin Press Test
```blocks
input.onPinPressed(TouchPin.P0, () => {
@ -49,34 +52,34 @@ input.onPinPressed(TouchPin.P1, () => {
input.onPinPressed(TouchPin.P2, () => {
basic.showNumber(2)
})
```
**Create the pin-press code**
```
**Create the pin-press code**
**Download the code** on the micro:bit
**Download the code** on the micro:bit
https://youtu.be/PAIU-vHqyGU
https://youtu.be/PAIU-vHqyGU
**Hold the micro:bit touching The GND pin with one hand**
**with the other hand alternately touch the 0, 1 and 2 pins**
**Hold the micro:bit touching The GND pin with one hand**
**with the other hand alternately touch the 0, 1 and 2 pins**
### ~hint
**The electric signal traveled from pins, between your hands to `GND` and the micro:bit detected the electric signal!**
### ~
## Step 2: Installing conductive foil on the guitar
https://youtu.be/NX0ECcpXFes
**Add foil to the guitar body where it is easy to touch while playing**
**The electric signal traveled from pins, between your hands to `GND` and the micro:bit detected the electric signal!**
### ~
**Connect the foil to `GND` using a crocodile clip**
## Step 2: Installing conductive foil on the guitar
https://youtu.be/NX0ECcpXFes
**Add foil to the guitar body where it is easy to touch while playing**
https://youtu.be/YkymZGNmkrE
**Add foil to the guitar neck**
**Connect the foil to `pin 1` using a crocodile clip**
**Connect the foil to `GND` using a crocodile clip**
## Step 3: Add a switch to turn the guitar ON and OFF
**Using the `on` global variable we can switch the message on the micro:bit**
**between ON and OFF**
https://youtu.be/YkymZGNmkrE
**Add foil to the guitar neck**
**Connect the foil to `pin 1` using a crocodile clip**
## Step 3: Add a switch to turn the guitar ON and OFF
**Using the `on` global variable we can switch the message on the micro:bit**
**between ON and OFF**
```blocks
let on = false
basic.forever(() => {
@ -93,11 +96,11 @@ input.onPinPressed(TouchPin.P1, () => {
on = true
}
})
```
**Create the ON/OFF switch code**
```
**Create the ON/OFF switch code**
**Download the code on the micro:bit**
**Download the code on the micro:bit**
**Test by touching `P1` to toggle the LED message between ON and OFF**
*Final code*
@ -120,9 +123,9 @@ basic.forever(() => {
input.onPinPressed(TouchPin.P1, () => {
on = !on;
})
```
## Now Play!
**Turn the guitar ON and OFF with a pin press on the connected foil**
**touching both pieces of foil at the same time to connect the switches**
https://youtu.be/GYmdTFvxz80
```
## Now Play!
**Turn the guitar ON and OFF with a pin press on the connected foil by**
**touching both pieces of foil at the same time to connect the switches**
https://youtu.be/GYmdTFvxz80

View File

@ -1,12 +1,17 @@
# hack your headphones
Hack your headphones
### @description A beginner maker activity, building a piano from bananas.
# micro:bit music
### ~avatar
Build your own music player micro:bit from headphones.
### ~
![](/static/mb/lessons/hack-your-headphones-0.png)
In this project, you will build your own music player micro:bit from headphones. Project duration: 15 minutes.
## Duration: ~15 minutes.
## Materials
@ -14,48 +19,13 @@ In this project, you will build your own music player micro:bit from headphones.
* Headphones
* Crocodile clips
## Steps
## Activities
### Step 1
* [Connect your headphone](/projects/hack-your-headphone/making)
* [Play sounds!]()
![](/static/mb/lessons/banana-keyboard-1.png)
### ~button /projects/hack-your-headphones/making
Using the 1st crocodile clip, connect the end of the crocodile clip onto GND pin on the micro:bit.
### Step 2
![](/static/mb/lessons/banana-keyboard-2.png)
![](/static/mb/lessons/banana-keyboard-3.png)
Using the 2nd crocodile clip, connect the end of the crocodile clip onto the 0 pin on the micro:bit.
### Step 3
![](/static/mb/lessons/banana-keyboard-4.png)
Using the 1st crocodile clip, connect the second end of the crocodile clip onto based of the headphone jack. The base of your headphone jack is considered the ground so it is connected to the GND of the micro:bit.
### Step 4
![](/static/mb/lessons/banana-keyboard-5.png)
![](/static/mb/lessons/hack-your-headphones-1.png)
Using the 2nd crocodile clip, connect the second end of the crocodile clip onto the tip of the headphone jack. The tip of your headphone jack feeds into the right speaker on the headphone. You connect from the micro:bit pin 0 to the tip of the right side of your headphone. Use the tip of the headphone jack to play sounds.
### Step 5
![](/static/mb/lessons/hack-your-headphones-0.png)
You hacked your headphones!
### Step 6
Connect your micro:bit to your computer using your USB cable and program [light beatbox](/projects/hack-your-headphones-challenges) music on it. Press the reset button to restart your music player!
### ~avatar avatar
Excellent, you're ready to continue with the [challenges](/projects/hack-your-headphones-challenges)!
Let's get started!
### ~

View File

@ -0,0 +1,47 @@
# hack your headphones - making
### ~avatar avatar
Did you know you could attach your headhpones to the micro:bit to generate sounds?
### ~
### Step 1
![](/static/mb/lessons/banana-keyboard-1.png)
Using the 1st crocodile clip, connect the end of the crocodile clip onto GND pin on the micro:bit.
### Step 2
![](/static/mb/lessons/banana-keyboard-2.png)
![](/static/mb/lessons/banana-keyboard-3.png)
Using the 2nd crocodile clip, connect the end of the crocodile clip onto the 0 pin on the micro:bit.
### Step 3
![](/static/mb/lessons/banana-keyboard-4.png)
Using the 1st crocodile clip, connect the second end of the crocodile clip onto based of the headphone jack. The base of your headphone jack is considered the ground so it is connected to the GND of the micro:bit.
### Step 4
![](/static/mb/lessons/banana-keyboard-5.png)
![](/static/mb/lessons/hack-your-headphones-1.png)
Using the 2nd crocodile clip, connect the second end of the crocodile clip onto the tip of the headphone jack. The tip of your headphone jack feeds into the right speaker on the headphone. You connect from the micro:bit pin 0 to the tip of the right side of your headphone. Use the tip of the headphone jack to play sounds.
### Step 5
![](/static/mb/lessons/hack-your-headphones-0.png)
You hacked your headphones!
### ~button /projects/hack-your-headphones/music-of-light
NEXT: music of light
### ~

View File

@ -1,6 +1,4 @@
# hack your headphones challenges
Control sound with the light level.
# hack your headphones - music of light
### ~avatar avatar
@ -70,7 +68,3 @@ input.onButtonPressed(Button.A, () => {
```
* click **Download** and run your code on the micro:bit.
### ~button /projects/banana-keyboard
NEXT: Banana Keyboard
### ~

View File

@ -48,7 +48,3 @@ input.onPinPressed(TouchPin.P2, () => {
`);
});
```
### ~button /projects/rock-paper-scissors
NEXT: Rock Paper Scissors
### ~

View File

@ -89,10 +89,6 @@ Have fun reviewing your simulation and analyze the acceleration by chart the Exc
* Review and analyze the actual micro:bit device acceleration data on Excel
* Display acceleration with y or z using plot bar graph by changing acceleration from "x" to "y" or "z"
### ~button /projects/the-watch
NEXT: The Watch
### ~
```package
microbit-radio
```

View File

@ -236,6 +236,3 @@ input.onButtonPressed(Button.B, () => {
How else can you make your game better?
Ever hear of [Rock Paper Scissors Spock Lizard](http://www.samkass.com/theories/RPSSL.html)?
### ~button /projects/compass
NEXT: Compass
### ~

View File

@ -67,7 +67,3 @@ input.onButtonPressed(Button.B, () => {
. # # # .`);
});
```
### ~button /projects/love-meter
NEXT: Love Meter
### ~

View File

@ -1,75 +1,25 @@
# telegraph activity
Build a telgraph.
# micro:bit telegraph
![](/static/mb/lessons/telegraph-0.png)
In this project, you will build your telegraph between micro:bits. Project duration: 15 minutes.
### ~avatar
Build a telegraph between two micro:bits to communicate with your friends!
### ~
## Duration: ~30 minutes
## Materials
* micro:bit, battery holder and 2 AAA batteries
* Crocodile clips
## Steps
## Activities
### Step 1
![](/static/mb/lessons/banana-keyboard-1.png)
Using the 1st crocodile clip, connect the end of the crocodile clip onto GND pin on the micro:bit.
### Step 2
![](/static/mb/lessons/ornament-chain-2.png)
Using the 2nd crocodile clip, connect the end of the crocodile clip onto the 3V pin on the micro:bit.
### Step 3
![](/static/mb/lessons/ornament-chain-3.png)
Using the 3rd crocodile clip, connect the end of the crocodile clip onto pin 1 of the micro:bit.
### Step 4
![](/static/mb/lessons/ornament-chain-4.png)
Using the 4th crocodile clip, connect the end of the crocodile clip onto pin 2 of the micro:bit.
### Step 5
![](/static/mb/lessons/ornament-chain-5.png)
Using the 1st crocodile clip, connect the unattached end of the crocodile clip onto the GND on the 2nd micro:bit.
### Step 6
![](/static/mb/lessons/ornament-chain-6.png)
Using the 2nd crocodile clip, connect the unattached end of the crocodile clip onto the 3V pin on the 2nd micro:bit.
### Step 7
![](/static/mb/lessons/ornament-chain-7.png)
Using the 3rd crocodile clip, connect the unattached end of the crocodile clip onto pin 2 of the 2nd micro:bit.
### Step 8
![](/static/mb/lessons/ornament-chain-8.png)
Using the 4th crocodile clip, connect the unattached end of the crocodile clip onto pin 1 of the 2nd micro:bit
### Step 9
![](/static/mb/lessons/telegraph-0.png)
### ~avatar avatar
Excellent, you're ready to continue with the [challenges](/projects/telegraph-challenges)!
* [Making the circuit](/projects/telegraph/making)
* [Manual telegraph](/projects/telegraph/manual-telegraph)
### ~button /projects/telegraph/making
Let's get started!
### ~

View File

@ -0,0 +1,75 @@
# telegraph - making
### ~avatar
Let's build a telegraph between two micro:bits.
### ~
![](/static/mb/lessons/telegraph-0.png)
## Materials
* micro:bit, battery holder and 2 AAA batteries
* Crocodile clips
## Steps
### Step 1
![](/static/mb/lessons/banana-keyboard-1.png)
Using the 1st crocodile clip, connect the end of the crocodile clip onto GND pin on the micro:bit.
### Step 2
![](/static/mb/lessons/ornament-chain-2.png)
Using the 2nd crocodile clip, connect the end of the crocodile clip onto the 3V pin on the micro:bit.
### Step 3
![](/static/mb/lessons/ornament-chain-3.png)
Using the 3rd crocodile clip, connect the end of the crocodile clip onto pin 1 of the micro:bit.
### Step 4
![](/static/mb/lessons/ornament-chain-4.png)
Using the 4th crocodile clip, connect the end of the crocodile clip onto pin 2 of the micro:bit.
### Step 5
![](/static/mb/lessons/ornament-chain-5.png)
Using the 1st crocodile clip, connect the unattached end of the crocodile clip onto the GND on the 2nd micro:bit.
### Step 6
![](/static/mb/lessons/ornament-chain-6.png)
Using the 2nd crocodile clip, connect the unattached end of the crocodile clip onto the 3V pin on the 2nd micro:bit.
### Step 7
![](/static/mb/lessons/ornament-chain-7.png)
Using the 3rd crocodile clip, connect the unattached end of the crocodile clip onto pin 2 of the 2nd micro:bit.
### Step 8
![](/static/mb/lessons/ornament-chain-8.png)
Using the 4th crocodile clip, connect the unattached end of the crocodile clip onto pin 1 of the 2nd micro:bit
### Step 9
![](/static/mb/lessons/telegraph-0.png)
### ~button /projects/telegraph/manual-telegraph
NEXT: manual telegraph
### ~

View File

@ -1,18 +1,10 @@
# telegraph activity
# telegraph - manual telegraph
Build a telegraph.
# micro:bit telegraph
Have you ever tried to communicate through a telegraph? Let's try coding a "Telegraph" on two BBC micro:bits !
Complete the following [tutorial](/projects/telegraph), your hack should look like this:
![](/static/mb/lessons/telegraph-0.png)
Let's build the code that will send a impulse while the user presses ``A``.
### Step 1
We now need to digitally write to the specified pin (P0) as digital. Let's start by adding the code in the pin drawer that includes 'digital write (0,1) to pin P0'.. Then insert 1 for digital write.
We now need to digitally write to pin ``P0`` as **high** (1).
```blocks
pins.digitalWritePin(DigitalPin.P0, 1)
@ -21,7 +13,8 @@ pins.digitalWritePin(DigitalPin.P0, 1)
### Step 2
We want to add a block to turn on an LED in the middle area of the LED display using plot x, y. So insert the appropriate LED plot x, y.
We want to add a block to turn on an LED in the middle area of the LED display using plot x, y.
So insert the appropriate LED plot x, y.
```blocks
pins.digitalWritePin(DigitalPin.P0, 1)
@ -31,7 +24,8 @@ led.plot(2, 2)
### Step 3
We want to insert a condition that tells us when to turn on the LED. So insert the if block under logic drawer. Then add a condition that occurs if we do not turn on a LED with plot x, y. We also should plot an LED on the display if button A is pressed. Your code should appear as follows:
We want to insert a condition that tells us when to turn on the LED. So insert the if block under logic drawer.
Then add a condition that occurs if we do not turn on a LED with plot x, y. We also should plot an LED on the display if button A is pressed. Your code should appear as follows:
```blocks
if (input.buttonIsPressed(Button.A)) {
@ -45,7 +39,7 @@ if (input.buttonIsPressed(Button.A)) {
### Step 4
We want to write code if button A is NOT pressed. It is important to say that digital write is not on. We also want to turn off all LED lights on the LED screen
We want to write code if button A is NOT pressed. It is important to say that digital write is not on. We also want to turn off all the LED light.
```blocks
if (input.buttonIsPressed(Button.A)) {
@ -53,7 +47,7 @@ if (input.buttonIsPressed(Button.A)) {
led.plot(2, 2)
} else {
pins.digitalWritePin(DigitalPin.P0, 0)
basic.clearScreen()
led.unplot(2, 2)
}
```
@ -64,27 +58,24 @@ Let's add a forever loop so this code runs in the background forever. Modify you
```blocks
basic.forever(() => {
if (input.buttonIsPressed(Button.A)) {
pins.digitalWritePin(DigitalPin.P0, 1)
led.plot(2, 2)
} else {
pins.digitalWritePin(DigitalPin.P0, 0)
basic.clearScreen()
}
})
pins.digitalWritePin(DigitalPin.P0, 1)
led.plot(2, 2)
} else {
pins.digitalWritePin(DigitalPin.P0, 0)
led.unplot(2, 2)
})
```
### Step 6
We now need to digitally read to the specified pin (P1) as digital. Let's start by going to the pin drawer and adding digital read pin (0,1) and changing the pin to P1. Now we need to create a condition for digital read pin (0,1). So we go to the logic drawer and select the comparison operator. Then we want to set the comparison operator to 1 to turn on digital read on pin 1. We want to insert a condition that tells us if button A is pressed and we should turn on digital read on pin 1. So insert the if block under logic drawer. Then add a condition that occurs if digital read on P1 is on. Then we want to plot x, y at the x, y coordinates of 2,2. we also want to say that if digital read pin P1 is not on, we want to turn off all LED lights on the screen. Your code should appear as follows:
```blocks
if (pins.digitalReadPin(DigitalPin.P1) == 1) {
led.plot(2, 2);
led.plot(4, 4);
}
else {
basic.clearScreen();
led.unplot(4, 4);
}
basic.forever(() => {
if (input.buttonIsPressed(Button.A)) {
@ -108,7 +99,3 @@ Your telegraph is ready!
* Connect the first micro:bit to your computer using your USB cable and put the telegraph script on it.
* Connect the second micro:bit to your computer using your USB cable and run the telegraph script on it.
* The first person and second person take turns pressing button A to play the telegraph game!
### ~button /projects/radio
NEXT: Radio
### ~

View File

@ -0,0 +1,231 @@
# Timing gates
### ~avatar
This project explains the principles of timing gates using household materials.
### ~
## Timing gates
The two gates are connected to the micro:bit and can detect a car passing through.
![](/static/mb/projects/timing-gates/sketchgates.jpg "Sketch of the gates")
As the car passes through the gate ``0``, it sends an event to the micro:bit through the [on pin pressed](/reference/input/on-pin-pressed) block.
The micro:bit records the time in a variable ``t0``.
![](/static/mb/projects/timing-gates/sketchgate1.jpg "Sketch first gate")
As the car passes through the gate ``1``, it sends an event to the micro:bit through the [on pin pressed](/reference/input/on-pin-pressed) block.
The micro:bit records the time in a variable ``t1``.
![](/static/mb/projects/timing-gates/sketchgate2.jpg "Sketch first gate")
The rest is a bit of math and physics. The time taken to cross the gates is computed as the difference of ``t1 - t0``.
By dividing the distance between the gates by the duration, we get the speed of the car!
![](/static/mb/projects/timing-gates/sketchmath.jpg "Sketch math")
## Materials
* Carboard
* Aluminum fail
* Double-side tape (carpet tape)
* 4 crocodile clips
* A micro:bit board and USB cable
![](/static/mb/projects/timing-gates/materials.jpg "Materials")
## blocks
```cards
basic.showLeds(`
. . . . .
. . . . .
. . # . .
. . . . .
. . . . .
`)
input.onPinPressed(TouchPin.P0, () => {})
let t = 0
input.runningTime()
t - 1
control.eventTimestamp();
basic.showNumber(0)
```
## Building the gate
The sensor is made by tapping two strips of fail on the cardboard as close as possible.
Add two strips of double-sided tape on the cardboard. Remove the protective film.
![](/static/mb/projects/timing-gates/tape.jpg "Double sided tape")
Lay the Aluminum foil on the double-sided tape. Press firmly on the tape to get a good bonding of the foil.
![](/static/mb/projects/timing-gates/stickfoil.jpg "Foil sensor")
Strip the out foil around and between the tape strips. Make sure both foil strips don't touch each other.
![](/static/mb/projects/timing-gates/spreadfoil.jpg "Foil taped")
Connect a crocodile strip to each foil strip.
![](/static/mb/projects/timing-gates/connectsensor.jpg "Connecting sensor")
Connect the crocodile plugs to the ``GND`` and ``P0`` pins on the micro:bit.
![](/static/mb/projects/timing-gates/connectcrocs.jpg "Connecting the micro:bit")
The gate is ready to use! Your circuit should look like the picture below:
![](/static/mb/projects/timing-gates/sensordone.jpg "A single gate")
## Detecting the car with code
The micro:bit provides an event [on pin pressed](/reference/pins/on-pin-pressed)
that is raised when a circuit between ``GND`` and a pin is detected. The circuit conductor could be a wire or even your body!
We will attach a foil to the bottom of the car. When it passes over the gate, it connect both foil strips, close the circuit and trigger the event.
Open the [code editor](/) and start a new project and add the following blocks. Notice that we are using pin ``P0`` here.
```blocks
basic.showLeds(`
. . . . .
. . . . .
. . # . .
. . . . .
. . . . .
`)
input.onPinPressed(TouchPin.P0, () => {
basic.showLeds(`
# . . . .
# . . . .
# . . . .
# . . . .
# . . . .
`)
})
```
Testing the code with our finger, we see a LED column turn on when pressing both strips.
https://youtu.be/zi_-NAmdDpY
## Upgrading the car
In this lesson, we picked a random toy car and tapped foil to the bottom.
As the car goes through the gate, it will connect both sides of the gate and trigger it. Make sure to add enough foil to get a good connection on the ground.
![](/static/mb/projects/timing-gates/carfoil.jpg "Attaching foil to the car")
By moving the car (slowly) through the gate, you will see that it triggers the ``on pin pressed`` event.
https://youtu.be/M3DIUvDPlIA
### ~hint
It does not work always! Sometimes the foil does not touch long enough both strip to be detected. This is due to the poor quality of our sensor.
To fix this, you would have to consider using better sensors based on IR or Hall effect.
### ~
## Adding the second gate
Repeat the same process with tape and foil to build the first gate.
![](/static/mb/projects/timing-gates/sensor2.jpg "Double foil sensors")
Connect the crocodile plugs to the ``GND`` and ``P1`` pins on the micro:bit.
![](/static/mb/projects/timing-gates/sensormicrobit2.jpg "Sensor and microbit")
## Detecting the second gate
Since the second gate is connected to pin ``P1``, we add a second [on pin pressed](/reference/pins/on-pin-pressed) event
that display 2 columns of LEDs.
```blocks
basic.showLeds(`
. . . . .
. . . . .
. . # . .
. . . . .
. . . . .
`)
input.onPinPressed(TouchPin.P0, () => {
basic.showLeds(`
# . . . .
# . . . .
# . . . .
# . . . .
# . . . .
`)
})
input.onPinPressed(TouchPin.P1, () => {
basic.showLeds(`
# . . . #
# . . . #
# . . . #
# . . . #
# . . . #
`)
})
```
Strolling the car over both gates, you can see how the first gate triggers then the second.
https://youtu.be/N4bWQcu6yWs
## Computing time
The micro:bit has a clock that measures time precisely. It measures how many seconds the micro:bit has been on.
We will record the time where each gate is tripped in variables ``t0`` and ``t1``.
We take the different between ``t1`` and ``t0`` to compute the duration between the gates.
```blocks
let t0 = 0;
let t1 = 0;
basic.showLeds(`
. . . . .
. . . . .
. . # . .
. . . . .
. . . . .
`)
input.onPinPressed(TouchPin.P0, () => {
t0 = control.eventTimestamp();
basic.showLeds(`
# . . . .
# . . . .
# . . . .
# . . . .
# . . . .
`)
})
input.onPinPressed(TouchPin.P1, () => {
t1 = control.eventTimestamp();
basic.showLeds(`
# . . . #
# . . . #
# . . . #
# . . . #
# . . . #
`)
let d = t1 - t0
basic.showNumber(d)
})
```
https://youtu.be/piyym_ux1EM
## Computing velocity
Measure the distance between the gates and apply Newton's laws to compute the velocity of the car.
v = d / t
We'll let you try to code this one on your own!

View File

@ -1,20 +1,11 @@
# Raspberry Pi and Raspbian
It is possible to run the web editor or [command line interface](/cli) from Raspbian on Raspberry Pi 2 or 3.
It is possible to run the web editor or [command line interface](/cli) from Raspbian on Raspberry Pi 2 or 3
with [Raspbian Jessie with Pixel](https://www.raspberrypi.org/downloads/raspbian/).
## Web editor
The web editor requires to install IceWeasel (Firefox) as the built-in browser cannot handle it.
```
sudo apt-get install iceweasel
```
Once installed simply navigate to https://codethemicrobit.com or type
```
firefox https://codethemicrobit.com
```
Starting with **Raspbian Pixel**, Raspbian comes with Chromium. Simply open [](https://codethemicrobit.com).
## Command line

View File

@ -23,13 +23,16 @@ Rather than just sharing the link, you can also embed the project so that your v
### General instructions
* Copy the HTML for embedding the page from the publish dialog. It will look like the following:
Select the kind of embedding you would like.
```html
<div class="ui card sim"><div class="ui content"><div style="position:relative;height:0;padding-bottom:70%;overflow:hidden;"><iframe style="position:absolute;top:0;left:0;width:100%;height:100%;" src="https://codethemicrobit.com/?sandbox=1#pub:httuftrbtg" allowfullscreen="allowfullscreen" frameborder="0"></iframe></div></div></div>
```
* **Screenshot** - a lightweight screenshot of the blocks that links to the snippet
* **Editor** - embedded editor with minimal UI
* **Simulator** - embedded simulator only
* **Command line** - specific instructions to unpack the project using the [command line](/cli) tools
* Open the HTML editor for your blog or website and paste it with your content
Copy the HTML for embedding the page from the publish dialog. It will look like the following:
Open the HTML editor for your blog or website and paste it with your content
### Wordpress

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 20 KiB

BIN
docs/static/mb/projects/timing-gates.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

View File

@ -1,5 +1,5 @@
{
"name": "microbit-bluetooth",
"name": "bluetooth",
"description": "Bluetooth services",
"files": [
"README.md",
@ -10,7 +10,7 @@
],
"public": true,
"dependencies": {
"microbit": "file:../microbit"
"core": "file:../core"
},
"yotta": {
"config": {

View File

@ -6,6 +6,26 @@
*/
//% color=#0078D7 weight=100
namespace basic {
/**
* Sets the color on the build-in LED. Set to 0 to turn off.
*/
//% blockId=device_set_led_color block="set led to %color=color_id" icon="\uf00a"
//% weight=50
void setLedColor(int color) {
if (!color) {
uBit.rgb.Off();
return;
}
int w = (color >> 24) & 0xFF;
int r = (color >> 16) & 0xFF;
int g = (color >> 8) & 0xFF;
int b = (color) & 0xFF;
uBit.rgb.Set_Color(r,g,b,w);
uBit.rgb.On();
uBit.rgb.Send_to_LED();
}
/**
* Scroll a number on the screen. If the number fits on the screen (i.e. is a single digit), do not scroll.

59
libs/core/basic.ts Normal file
View File

@ -0,0 +1,59 @@
/**
Well known colors
*/
enum Colors {
//% blockIdentity=basic.color
//% block=red
Red = 0x00FF0000,
//% blockIdentity=basic.color
//% block=orange
Orange = 0x00FFA500,
//% blockIdentity=basic.color
//% block=yellow
Yellow = 0x00FFFF00,
//% blockIdentity=basic.color
//% block=green
Green = 0x0000FF00,
//% blockIdentity=basic.color
//% block=blue
Blue = 0x000000FF,
//% blockIdentity=basic.color
//% block=indigo
Indigo = 0x004b0082,
//% blockIdentity=basic.color
//% block=violet
Violet = 0x008a2be2,
//% blockIdentity=basic.color
//% block=purple
Purple = 0x00FF00FF,
//% blockIdentity=basic.color
//% block=white
White = 0xFF00000
}
/**
* Provides access to basic micro:bit functionality.
*/
//% color=#0078D7 weight=100
namespace basic {
/**
* Converts the color name to a number
*/
//% blockId=color_id block="%c" shim=TD_ID
export function color(c: Colors): number {
return c;
}
/**
* Converts red, green, blue channels into a RGB color
* @param red value of the red channel between 0 and 255. eg: 255
* @param green value of the green channel between 0 and 255. eg: 255
* @param blue value of the blue channel between 0 and 255. eg: 255
* @param white value of the white channel between 0 and 255. eg: 0
*/
//% weight=1
//% blockId="core_rgb" block="red %red|green %green|blue %blue|white %white"
export function rgbw(red: number, green: number, blue: number, white:number): number {
return ((white & 0xFF) << 24) | ((red & 0xFF) << 16) | ((green & 0xFF) << 8) | (blue & 0xFF);
}
}

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -1,5 +1,5 @@
{
"name": "microbit",
"name": "core",
"description": "The microbit core library",
"installedVersion": "tsmdvf",
"files": [
@ -41,7 +41,8 @@
"microbit-dal": {
"bluetooth": {
"enabled": 0
}
},
"debug": 1
}
}
}

View File

@ -128,6 +128,13 @@ declare interface Image {
//% color=#0078D7 weight=100
declare namespace basic {
/**
* Sets the color on the build-in LED. Set to 0 to turn off.
*/
//% blockId=device_set_led_color block="set led to %color=color_id" icon="\uf00a"
//% weight=50 shim=basic::setLedColor
function setLedColor(color: number): void;
/**
* Scroll a number on the screen. If the number fits on the screen (i.e. is a single digit), do not scroll.
* @param interval speed of scroll; eg: 150, 100, 200, -100

View File

@ -1,5 +1,5 @@
{
"name": "microbit-devices",
"name": "devices",
"description": "The BLE specific services",
"files": [
"README.md",
@ -9,7 +9,7 @@
],
"public": true,
"dependencies": {
"microbit": "file:../microbit"
"core": "file:../core"
},
"yotta": {
"config": {

View File

@ -1,7 +1,6 @@
basic.plotLeds(`
# # . # #
. . # . .
. . # . .
# . . . #
. # # # .
`);
led.plot(0, 0)
basic.pause(1000);
basic.forever(() => {
const a = input.acceleration(Dimension.X);
led.plotBarGraph(a, 1023)
})

View File

@ -6,7 +6,6 @@
],
"public": true,
"dependencies": {
"microbit": "file:../microbit",
"microbit-radio": "file:../microbit-radio"
"core": "file:../core"
}
}

Some files were not shown because too many files have changed in this diff Show More