Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
777ba40899 | |||
0d11c16ecf | |||
9c1628b977 | |||
953b362b34 | |||
8b40850a94 |
@ -149,6 +149,10 @@ By copying the script onto the `MICROBIT` drive, you have programmed it into the
|
|||||||
flash memory on the micro:bit, which means even after you unplug the micro:bit,
|
flash memory on the micro:bit, which means even after you unplug the micro:bit,
|
||||||
your program will still run if the micro:bit is powered by battery.
|
your program will still run if the micro:bit is powered by battery.
|
||||||
|
|
||||||
|
If you want to save time, you can use the [micro:bit uploader](/uploader) to
|
||||||
|
automatically deploy hex files to your micro:bit. It works on Windows and is
|
||||||
|
compatible with any browser.
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
You can’t drag and drop more than one hex file at once onto your micro:bit. If
|
You can’t drag and drop more than one hex file at once onto your micro:bit. If
|
||||||
|
BIN
docs/static/mb/device/usb-generic.jpg
vendored
Normal file
After Width: | Height: | Size: 343 KiB |
BIN
docs/static/mb/device/usb-mac.jpg
vendored
Normal file
After Width: | Height: | Size: 593 KiB |
BIN
docs/static/mb/device/usb-osx-chrome.png
vendored
Before Width: | Height: | Size: 186 KiB After Width: | Height: | Size: 74 KiB |
BIN
docs/static/mb/device/usb-osx-firefox-1.png
vendored
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 201 KiB |
BIN
docs/static/mb/device/usb-windows-chrome.png
vendored
Before Width: | Height: | Size: 162 KiB After Width: | Height: | Size: 8.4 KiB |
BIN
docs/static/mb/device/usb-windows-edge-1.png
vendored
Before Width: | Height: | Size: 156 KiB After Width: | Height: | Size: 24 KiB |
BIN
docs/static/mb/device/usb-windows-edge-2.png
vendored
Before Width: | Height: | Size: 135 KiB After Width: | Height: | Size: 18 KiB |
BIN
docs/static/mb/device/usb-windows-firefox-1.png
vendored
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 12 KiB |
BIN
docs/static/mb/device/usb-windows-ie11-1.png
vendored
Before Width: | Height: | Size: 164 KiB After Width: | Height: | Size: 10 KiB |
BIN
docs/static/mb/device/usb-windows-ie11-2.png
vendored
Before Width: | Height: | Size: 159 KiB After Width: | Height: | Size: 10 KiB |
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "pxt-microbit",
|
"name": "pxt-microbit",
|
||||||
"version": "0.4.1",
|
"version": "0.4.2",
|
||||||
"description": "micro:bit target for PXT",
|
"description": "micro:bit target for PXT",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"JavaScript",
|
"JavaScript",
|
||||||
@ -29,6 +29,6 @@
|
|||||||
"typescript": "^1.8.7"
|
"typescript": "^1.8.7"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"pxt-core": "0.4.2"
|
"pxt-core": "0.4.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -143,7 +143,70 @@
|
|||||||
"path": "/device"
|
"path": "/device"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sideDoc": "getting-started"
|
"sideDoc": "getting-started",
|
||||||
|
"usbDocs": "/device/usb",
|
||||||
|
"usbHelp": [
|
||||||
|
{
|
||||||
|
"name": "connection",
|
||||||
|
"os": "*",
|
||||||
|
"browser": "*",
|
||||||
|
"path": "/static/mb/device/usb-generic.jpg"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "connection",
|
||||||
|
"os": "mac",
|
||||||
|
"browser": "*",
|
||||||
|
"path": "/static/mb/device/usb-mac.jpg"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "save",
|
||||||
|
"os": "windows",
|
||||||
|
"browser": "firefox",
|
||||||
|
"path": "/static/mb/device/usb-windows-firefox-1.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "save",
|
||||||
|
"os": "mac",
|
||||||
|
"browser": "firefox",
|
||||||
|
"path": "/static/mb/device/usb-osx-firefox-1.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "save",
|
||||||
|
"os": "mac",
|
||||||
|
"browser": "chrome",
|
||||||
|
"path": "/static/mb/device/usb-osx-chrome.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "save",
|
||||||
|
"os": "windows",
|
||||||
|
"browser": "edge",
|
||||||
|
"path": "/static/mb/device/usb-windows-edge-1.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "save",
|
||||||
|
"os": "windows",
|
||||||
|
"browser": "ie",
|
||||||
|
"path": "/static/mb/device/usb-windows-ie11-1.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "save",
|
||||||
|
"os": "windows",
|
||||||
|
"browser": "chrome",
|
||||||
|
"path": "/static/mb/device/usb-windows-chrome.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "copy",
|
||||||
|
"os": "mac",
|
||||||
|
"browser": "*",
|
||||||
|
"path": "/static/mb/device/usb-osx-dnd.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "copy",
|
||||||
|
"os": "windows",
|
||||||
|
"browser": "*",
|
||||||
|
"path": "/static/mb/device/usb-windows-sendto.jpg"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"analytics": {
|
"analytics": {
|
||||||
"userVoiceApiKey": "WEkkIGaj1WtJnSUF59iwaA",
|
"userVoiceApiKey": "WEkkIGaj1WtJnSUF59iwaA",
|
||||||
|
@ -117,8 +117,9 @@ namespace pxsim.visuals {
|
|||||||
public setRgb(rgb: [number, number, number]) {
|
public setRgb(rgb: [number, number, number]) {
|
||||||
let hsl = rgbToHsl(rgb);
|
let hsl = rgbToHsl(rgb);
|
||||||
let [h, s, l] = hsl;
|
let [h, s, l] = hsl;
|
||||||
//We ignore luminosity since it doesn't map well to real-life brightness
|
// at least 70% luminosity
|
||||||
let fill = `hsl(${h}, ${s}%, 70%)`;
|
l = Math.max(l, 60);
|
||||||
|
let fill = `hsl(${h}, ${s}%, ${l}%)`;
|
||||||
this.el.setAttribute("fill", fill);
|
this.el.setAttribute("fill", fill);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -203,18 +204,9 @@ namespace pxsim.visuals {
|
|||||||
function parseNeoPixelMode(modeStr: string): NeoPixelMode {
|
function parseNeoPixelMode(modeStr: string): NeoPixelMode {
|
||||||
const modeMap: Map<NeoPixelMode> = {
|
const modeMap: Map<NeoPixelMode> = {
|
||||||
"NeoPixelMode.RGB": NeoPixelMode.RGB,
|
"NeoPixelMode.RGB": NeoPixelMode.RGB,
|
||||||
"NeoPixelMode.RGBW": NeoPixelMode.RGBW,
|
"NeoPixelMode.RGBW": NeoPixelMode.RGBW
|
||||||
"*": NeoPixelMode.RGB,
|
|
||||||
};
|
};
|
||||||
let mode: NeoPixelMode = null;
|
return modeMap[modeStr] || NeoPixelMode.RGB;
|
||||||
for (let key in modeMap) {
|
|
||||||
if (key == modeStr) {
|
|
||||||
mode = modeMap[key];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
U.assert(mode != null, "Unknown NeoPixelMode: " + modeStr);
|
|
||||||
return mode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class NeoPixelView implements IBoardPart<NeoPixelState> {
|
export class NeoPixelView implements IBoardPart<NeoPixelState> {
|
||||||
|