Compare commits

...

5 Commits

Author SHA1 Message Date
7e1248b8dc 0.2.26 2016-04-05 16:15:58 -07:00
cbe280187a Bump kindscript to 0.2.26 2016-04-05 16:15:56 -07:00
761e4f38cd adding namespace descriptions 2016-04-05 15:59:25 -07:00
a9137f7761 first radio namespace docs 2016-04-05 14:10:53 -07:00
3274e237cf 0.2.25 2016-04-05 14:05:36 -07:00
12 changed files with 51 additions and 6 deletions

View File

@ -8,9 +8,9 @@ input.onButtonPressed(Button.A, () => {});
led.plot(0,0);
radio.sendNumber(0);
music.playTone(music.noteFrequency(Note.C), music.beat(BeatFraction.Whole));
game.createSprite();
game.createSprite(2,2);
pins.digitalReadPin(DigitalPin.P0);
serial.WriteLine("Hello!")
serial.writeLine("Hello!");
control.inBackground(() => {});
```

17
docs/reference/radio.md Normal file
View File

@ -0,0 +1,17 @@
# Radio
```cards
radio.sendNumber(0);
radio.sendNumbers(0, 0, 0, 0);
radio.onDataReceived(() => {
});
radio.receiveNumber();
radio.receivedNumberAt(0);
radio.receivedSignalStrength();
radio.setGroup(0);
radio.setTransmitPower(0);
```

View File

@ -113,6 +113,9 @@ enum EventBusValue {
MES_REMOTE_CONTROL_EVT_VOLUMEUP_ = MES_REMOTE_CONTROL_EVT_VOLUMEUP,
};
/**
* Runtime and event utilities.
*/
//% weight=1 color="#333333"
namespace control {
void fiberDone(void *a)

View File

@ -18,6 +18,9 @@ enum LedSpriteProperty {
Blink
}
/**
* A single-LED sprite game engine
*/
//% color=176 weight=32
namespace game {
var _score: number = 0;

View File

@ -1,5 +1,8 @@
#include "ksbit.h"
/**
* Creation, manipulation and display of LED images.
*/
//% color=45 weight=31
namespace images {
/**

View File

@ -1,3 +1,6 @@
/**
* Events and data from sensors
*/
//% color=300 weight=99
namespace input {
/**

View File

@ -1,3 +1,6 @@
/**
* Control of the LED screen.
*/
//% color=3 weight=35
namespace led {

View File

@ -74,6 +74,9 @@ enum BeatFraction {
Sixteenth = 16
}
/**
* Generation of music tones through pin ``P0``.
*/
//% color=52 weight=33
namespace music {
var beatsPerMinute: number = 120;

View File

@ -1,3 +1,6 @@
/**
* Control currents in Pins for analog/digital signals, servos, i2c, ...
*/
//% color=351 weight=30
namespace pins {
/**

View File

@ -1,3 +1,6 @@
/**
* Reading and writing data over a serial connection.
*/
//% weight=2 color=30
namespace serial {
/**

View File

@ -1,7 +1,9 @@
// Auto-generated. Do not edit.
/**
* Creation, manipulation and display of LED images.
*/
//% color=45 weight=31
declare namespace images {
@ -265,7 +267,9 @@ declare namespace input {
}
/**
* Runtime and event utilities.
*/
//% weight=1 color="#333333"
declare namespace control {

View File

@ -1,6 +1,6 @@
{
"name": "kindscript-microbit",
"version": "0.2.24",
"version": "0.2.26",
"description": "BBC micro:bit target for KindScript",
"keywords": [
"JavaScript",
@ -29,6 +29,6 @@
"typescript": "^1.8.7"
},
"dependencies": {
"kindscript": "0.2.25"
"kindscript": "0.2.26"
}
}