Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
61bab257eb | |||
2e90b351da | |||
801bd6c7a0 | |||
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,
|
||||
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
|
||||
|
||||
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: 11 KiB |
Before Width: | Height: | Size: 164 KiB After Width: | Height: | Size: 54 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: 6.9 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 |
BIN
docs/static/mb/device/usb-windows-sendto.jpg
vendored
Before Width: | Height: | Size: 160 KiB After Width: | Height: | Size: 50 KiB |
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pxt-microbit",
|
||||
"version": "0.4.1",
|
||||
"version": "0.4.3",
|
||||
"description": "micro:bit target for PXT",
|
||||
"keywords": [
|
||||
"JavaScript",
|
||||
@ -29,6 +29,6 @@
|
||||
"typescript": "^1.8.7"
|
||||
},
|
||||
"dependencies": {
|
||||
"pxt-core": "0.4.2"
|
||||
"pxt-core": "0.4.3"
|
||||
}
|
||||
}
|
||||
|
@ -143,7 +143,70 @@
|
||||
"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": {
|
||||
"userVoiceApiKey": "WEkkIGaj1WtJnSUF59iwaA",
|
||||
|
@ -117,8 +117,9 @@ namespace pxsim.visuals {
|
||||
public setRgb(rgb: [number, number, number]) {
|
||||
let hsl = rgbToHsl(rgb);
|
||||
let [h, s, l] = hsl;
|
||||
//We ignore luminosity since it doesn't map well to real-life brightness
|
||||
let fill = `hsl(${h}, ${s}%, 70%)`;
|
||||
// at least 70% luminosity
|
||||
l = Math.max(l, 60);
|
||||
let fill = `hsl(${h}, ${s}%, ${l}%)`;
|
||||
this.el.setAttribute("fill", fill);
|
||||
}
|
||||
}
|
||||
@ -203,18 +204,9 @@ namespace pxsim.visuals {
|
||||
function parseNeoPixelMode(modeStr: string): NeoPixelMode {
|
||||
const modeMap: Map<NeoPixelMode> = {
|
||||
"NeoPixelMode.RGB": NeoPixelMode.RGB,
|
||||
"NeoPixelMode.RGBW": NeoPixelMode.RGBW,
|
||||
"*": NeoPixelMode.RGB,
|
||||
"NeoPixelMode.RGBW": NeoPixelMode.RGBW
|
||||
};
|
||||
let mode: NeoPixelMode = null;
|
||||
for (let key in modeMap) {
|
||||
if (key == modeStr) {
|
||||
mode = modeMap[key];
|
||||
break;
|
||||
}
|
||||
}
|
||||
U.assert(mode != null, "Unknown NeoPixelMode: " + modeStr);
|
||||
return mode;
|
||||
return modeMap[modeStr] || NeoPixelMode.RGB;
|
||||
}
|
||||
|
||||
export class NeoPixelView implements IBoardPart<NeoPixelState> {
|
||||
|