Compare commits
2 Commits
v1.2.23
...
drivingbas
Author | SHA1 | Date | |
---|---|---|---|
|
540a097198 | ||
|
93cfb76f68 |
13
docs/fll.md
13
docs/fll.md
@@ -35,13 +35,6 @@ On the home page, scroll down to the **FLL / City Shaper** section for specific
|
|||||||
|
|
||||||
Yes.
|
Yes.
|
||||||
|
|
||||||
### Can I run the program again on the brick?
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
Use the Brick Buttons and navigate to the File Manager tab. Open the **BrkProg_SAVE** folder,
|
|
||||||
select your program and click the center button to run it again.
|
|
||||||
|
|
||||||
### Does it work without internet?
|
### Does it work without internet?
|
||||||
|
|
||||||
No, the editor is cached in your browser cache. However, you can also download the [offline app](/offline-app) in case you need to install it on a computer.
|
No, the editor is cached in your browser cache. However, you can also download the [offline app](/offline-app) in case you need to install it on a computer.
|
||||||
@@ -105,12 +98,6 @@ The official answer is currently no. That being said, we have **Experimental sup
|
|||||||
|
|
||||||
https://youtu.be/VIq8-6Egtqs
|
https://youtu.be/VIq8-6Egtqs
|
||||||
|
|
||||||
## Are there YouTube videos on MakeCode for EV3?
|
|
||||||
|
|
||||||
The MakeCode has a [FLL / City Shaper YouTube Channel](https://www.youtube.com/watch?v=IqL0Pyeu5Ng&list=PLMMBk9hE-SeqkOObethhlZtBTEK6FYx3n) with useful videos.
|
|
||||||
|
|
||||||
https://youtu.be/-AirqwC9DL4
|
|
||||||
|
|
||||||
### Why can't I delete my program (*.uf2) files from the Brick?
|
### Why can't I delete my program (*.uf2) files from the Brick?
|
||||||
|
|
||||||
There's a bug in the firmware which prevents you from deleting the programs (``*.uf2`` files) from your EV3 Brick. There isn't a firmware update to fix this yet.
|
There's a bug in the firmware which prevents you from deleting the programs (``*.uf2`` files) from your EV3 Brick. There isn't a firmware update to fix this yet.
|
||||||
|
@@ -54,12 +54,6 @@ Verify that the program you just created shows eyes on the Brick Display, and th
|
|||||||
|
|
||||||
**Well done!**
|
**Well done!**
|
||||||
|
|
||||||
## Run it Again
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
Use the Brick Buttons and navigate to the File Manager tab. Open the **BrkProg_SAVE** folder, select **Try** and click the center button to run it again.
|
|
||||||
|
|
||||||
## Connect a Large Motor
|
## Connect a Large Motor
|
||||||
|
|
||||||
Now you will learn to control the Large Motor.
|
Now you will learn to control the Large Motor.
|
||||||
|
@@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"appref": "v1.2.22"
|
"appref": "v1.2.18"
|
||||||
}
|
}
|
||||||
|
@@ -388,12 +388,12 @@
|
|||||||
}
|
}
|
||||||
function downloadWin64() {
|
function downloadWin64() {
|
||||||
// TODO: Keep this link up-to-date with the desired release version
|
// TODO: Keep this link up-to-date with the desired release version
|
||||||
window.open("https://makecode.com/api/release/ev3/v1.2.22/win64");
|
window.open("https://makecode.com/api/release/ev3/v1.1.20/win64");
|
||||||
tickEvent("offlineapp.download", { "target": "ev3", "platform": "win64" });
|
tickEvent("offlineapp.download", { "target": "ev3", "platform": "win64" });
|
||||||
}
|
}
|
||||||
function downloadMac64() {
|
function downloadMac64() {
|
||||||
// TODO: Keep this link up-to-date with the desired release version
|
// TODO: Keep this link up-to-date with the desired release version
|
||||||
window.open("https://makecode.com/api/release/ev3/v1.2.22/mac64");
|
window.open("https://makecode.com/api/release/ev3/v1.1.20/mac64");
|
||||||
tickEvent("offlineapp.download", { "target": "ev3", "platform": "mac64" });
|
tickEvent("offlineapp.download", { "target": "ev3", "platform": "mac64" });
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
BIN
docs/static/getting-started/try-in-file-manager.png
vendored
BIN
docs/static/getting-started/try-in-file-manager.png
vendored
Binary file not shown.
Before Width: | Height: | Size: 89 KiB |
@@ -36,14 +36,6 @@
|
|||||||
"name": "Line following with 1 color sensor",
|
"name": "Line following with 1 color sensor",
|
||||||
"description": "Simple line following using the color sensor.",
|
"description": "Simple line following using the color sensor.",
|
||||||
"youTubeId": "_LeduyKQVjg"
|
"youTubeId": "_LeduyKQVjg"
|
||||||
}, {
|
|
||||||
"name": "Proportional line following with 1 color sensor",
|
|
||||||
"description": "Proportional line following using the color sensor.",
|
|
||||||
"youTubeId": "-AirqwC9DL4"
|
|
||||||
}, {
|
|
||||||
"name": "Proportional line following with 2 color sensors",
|
|
||||||
"description": "Proportional line following using two color sensor.",
|
|
||||||
"youTubeId": "QWOflBuu9Oo"
|
|
||||||
}]
|
}]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@@ -149,9 +149,9 @@ export class FieldMotors extends Blockly.FieldDropdown implements Blockly.FieldC
|
|||||||
getFirstValueI11n(value: string) {
|
getFirstValueI11n(value: string) {
|
||||||
const firstValue = this.getFirstValue(value);
|
const firstValue = this.getFirstValue(value);
|
||||||
const motorOptions = {
|
const motorOptions = {
|
||||||
'medium motor': lf("medium motor"),
|
'medium motor': lf('medium motor'),
|
||||||
'large motor': lf("large motor"),
|
'large motor': lf('large motor'),
|
||||||
'large motors': lf("large motors")
|
'large motors': lf('large motors')
|
||||||
}
|
}
|
||||||
return motorOptions[firstValue];
|
return motorOptions[firstValue];
|
||||||
}
|
}
|
||||||
|
@@ -524,7 +524,6 @@ void stopProgram() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void target_reset() {
|
extern "C" void target_reset() {
|
||||||
pthread_mutex_trylock(&execMutex);
|
|
||||||
stopMotors();
|
stopMotors();
|
||||||
stopProgram();
|
stopProgram();
|
||||||
if (lmsPid)
|
if (lmsPid)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "pxt-ev3",
|
"name": "pxt-ev3",
|
||||||
"version": "1.2.23",
|
"version": "1.2.21",
|
||||||
"description": "LEGO MINDSTORMS EV3 for Microsoft MakeCode",
|
"description": "LEGO MINDSTORMS EV3 for Microsoft MakeCode",
|
||||||
"private": false,
|
"private": false,
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
BIN
sim/public/cityshapermap.jpg
Normal file
BIN
sim/public/cityshapermap.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 115 KiB |
55
sim/visuals/robotgametable.ts
Normal file
55
sim/visuals/robotgametable.ts
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
namespace pxsim {
|
||||||
|
export class RobotGameTable {
|
||||||
|
readonly ctx: CanvasRenderingContext2D;
|
||||||
|
readonly data: ImageData;
|
||||||
|
|
||||||
|
cx: number; // cm
|
||||||
|
cy: number; // cm
|
||||||
|
angle: number; // radians
|
||||||
|
cwidth: number; // cm
|
||||||
|
|
||||||
|
constructor(public canvas: HTMLCanvasElement, public scale: number) {
|
||||||
|
this.ctx = this.canvas.getContext("2d");
|
||||||
|
this.data = this.ctx.getImageData(0, 0, this.canvas.width, this.canvas.height);
|
||||||
|
this.cx = this.width / 2;
|
||||||
|
this.cy = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the width in cm
|
||||||
|
*/
|
||||||
|
get width() {
|
||||||
|
return this.canvas.width * this.scale;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gets the height in cm
|
||||||
|
*/
|
||||||
|
get height() {
|
||||||
|
return this.canvas.height * this.scale;
|
||||||
|
}
|
||||||
|
|
||||||
|
color(): number {
|
||||||
|
// compute color sensor position from center;
|
||||||
|
// todo
|
||||||
|
const px = Math.max(0, Math.min(this.data.width, (this.cx ) / this.scale));
|
||||||
|
const py = Math.max(0, Math.min(this.data.height, (this.cy ) / this.scale));
|
||||||
|
// get color
|
||||||
|
const i = px * this.data.width + py;
|
||||||
|
let c =
|
||||||
|
(this.data.data[i] << 16) | (this.data.data[i + 1] << 8) | (this.data.data[i + 2]);
|
||||||
|
// map color to known color
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
|
||||||
|
intensity(): number {
|
||||||
|
const c = this.color();
|
||||||
|
return ((c >> 16 & 0xff) + (c >> 8 & 0xff) + (c & 0xff)) / 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
ultrasonicDistance() {
|
||||||
|
// obstacles?
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -27,6 +27,6 @@
|
|||||||
"Videos": "videos"
|
"Videos": "videos"
|
||||||
},
|
},
|
||||||
"electronManifest": {
|
"electronManifest": {
|
||||||
"latest": "v1.2.22"
|
"latest": "v1.1.20"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user