Compare commits
29 Commits
Author | SHA1 | Date | |
---|---|---|---|
7349e28898 | |||
26b9fdf40e | |||
3cf82b9be2 | |||
546c44bafa | |||
d727d3fcde | |||
6b0cf961c6 | |||
18419d763d | |||
99fdb53fa0 | |||
879fdd687e | |||
6c1b879c34 | |||
019bbc79fc | |||
f857a88541 | |||
6531e7bfbb | |||
2147225afd | |||
841ea6d060 | |||
3dddb2eb30 | |||
651cf14556 | |||
7f6fb5559b | |||
ea724038dc | |||
19757d4245 | |||
07a7b4048a | |||
45742aa2ac | |||
db0c5d9f9f | |||
8285250a1b | |||
de0257c7e9 | |||
3580012065 | |||
cdb23fffb6 | |||
f76235736a | |||
980ad6ce91 |
@ -6,7 +6,7 @@
|
||||
### ~column
|
||||
|
||||
## O365 Integration
|
||||
* [Science Experiments: Graphing & Charting](/lessons/charting), create an app for simulating and measuring sensor data of acceleration, temperature, light level, and rotation
|
||||
* [Science Experiments: Chart](/lessons/charting), create an app for simulating and measuring sensor data of acceleration, temperature, light level, and rotation
|
||||
|
||||
## Beginner
|
||||
|
||||
|
@ -7,8 +7,10 @@ Create a charting app for simulating and measuring the acceleration applied to t
|
||||
Acceleration
|
||||
|
||||
## Quick Links
|
||||
* [Chart Acceleration: Activity](/lessons/charting/acceleration)
|
||||
* [Chart Acceleration: Challenge](/lessons/charting/acceleration-challenge)
|
||||
* [activity](/lessons/charting/acceleration)
|
||||
* [challenge](/lessons/charting/challenge)
|
||||
* [quiz](/lessons/charting/quiz)
|
||||
* [answers](/lessons/charting/quiz-answers)
|
||||
|
||||
## Prior learning/place of lesson in scheme of work
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Chart Acceleration: Activity
|
||||
# Activity
|
||||
|
||||
Measure the acceleration on the micro:bit in the "x" direction.
|
||||
|
||||
@ -39,7 +39,7 @@ Vigorously move the micro:bit in the micro:bit simulatator by moving the micro:b
|
||||
|
||||
### ~
|
||||
|
||||
Review and write down your observations from the Excel data. Then chart or graph the data collected by using a tool in Excel.
|
||||
We want to chart the data collected by using a tool in Excel.
|
||||
|
||||
The final part of this experiment is opening and reviewing the data in the Excel CSV file. Simply click on the line beneath the simulator. A CSV file will be generated to display the data points collected by moving the micro:bit in the X direction. Then click or tap on the data Excel file that was downloaded to your local Downloads Folder.
|
||||
|
||||
@ -55,7 +55,6 @@ Use the Recommended Charts command on the Insert tab to quickly create a chart t
|
||||
|
||||
* Select the data that you want to include in your chart.
|
||||
|
||||
|
||||
* Click Insert > Recommended Charts.
|
||||
|
||||

|
||||
@ -76,6 +75,7 @@ Tip: If you don’t see a chart type that you want, click the All Charts tab to
|
||||
|
||||
* Connect a micro:bit to your computer using your USB cable; compile; and repeat this experiment by moving the micro:bit in the "x" direction. Then collect and chart the data on Excel.
|
||||
* Review and analyze the actual micro:bit device data on Excel
|
||||
* Display acceleration with y or z using plot bar graph by changing acceleration from "x" to "y" or "z"
|
||||
|
||||
### ~avatar avatar
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Chart Acceleration: Challenge
|
||||
# Challenge
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
@ -90,10 +90,5 @@ Have fun reviewing your simulation and analyze the acceleration by chart the Exc
|
||||
* Connect the second micro:bit to your computer using your USB cable and run the charting script on it.
|
||||
* The first person and second person take turns tilting the micro:bit in the "x" direction while the other player charts the data on the micro:bit!
|
||||
* 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"
|
||||
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Excellent, you're ready to continue with the [challenges](/lessons/charting/acceleration)
|
||||
|
||||
### ~
|
33
docs/lessons/charting/quiz-answers.md
Normal file
33
docs/lessons/charting/quiz-answers.md
Normal file
@ -0,0 +1,33 @@
|
||||
# charting quiz answers
|
||||
|
||||
Measure the acceleration on the micro:bit in the "x" direction.
|
||||
|
||||
|
||||
## Name
|
||||
|
||||
## Directions
|
||||
|
||||
Use this activity document to guide your work in the [glowing pendulum activity](/lessons/charting/acceleration)
|
||||
|
||||
Answer the questions while completing the tutorial. Pay attention to the dialogues!
|
||||
|
||||
## 1. Why are you creating a 'forever' loop?
|
||||
|
||||
<br/>
|
||||
|
||||
We are creating a forever loop to constantly display the appropriate brightness on the LED display.
|
||||
|
||||
## 2. Write the line of code to measure the acceleration with respect to the "x" axis and display this value in a bar graph.
|
||||
|
||||
<br/>
|
||||
|
||||
```blocks
|
||||
led.plotBarGraph(input.acceleration(Dimension.X), 0)
|
||||
```
|
||||
|
||||
## 3. After vigarously moving the micro:bit from side to side along the "x" axis for a sufficient amount of time,insert the Excel graph for displaying a line chart used to display trends over time.
|
||||
|
||||
<br/>
|
||||
|
||||

|
||||
|
23
docs/lessons/charting/quiz.md
Normal file
23
docs/lessons/charting/quiz.md
Normal file
@ -0,0 +1,23 @@
|
||||
# charting quiz
|
||||
|
||||
Measure the acceleration on the micro:bit in the "x" direction.
|
||||
|
||||
## Name
|
||||
|
||||
## Directions
|
||||
|
||||
Use this activity document to guide your work in the [glowing pendulum tutorial](/lessons/glowing-pendulum/activity)
|
||||
|
||||
Answer the questions while completing the tutorial. Pay attention to the dialogues!
|
||||
|
||||
## 1. Why are you creating a 'forever' loop?
|
||||
|
||||
<br/>
|
||||
|
||||
## 2. Write the line of code to measure the acceleration with respect to the "y" axis and store this value in a local variable called 'acceleration'.
|
||||
|
||||
<br/>
|
||||
|
||||
## 3. After vigarously moving the micro:bit from side to side along the "x" axis for a sufficient amount of time,insert the Excel graph for displaying a line chart used to display trends over time.
|
||||
|
||||
|
34
docs/lessons/seismograph.md
Normal file
34
docs/lessons/seismograph.md
Normal file
@ -0,0 +1,34 @@
|
||||
# Seismograph Lesson
|
||||
|
||||
Build a seismograph with household materials
|
||||
|
||||
## Topic
|
||||
|
||||
Acceleration & Analog Read Pin
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [activity](/lessons/seismograph/activity)
|
||||
* [challenge](/lessons/seismograph/challenges)
|
||||
|
||||
## Prior learning/place of lesson in scheme of work
|
||||
|
||||
Learn how to **show LEDs** to turn on a LED light pattern on the LED screen. We will be learning basic comments such as show LEDs and pause.
|
||||
|
||||
## Documentation
|
||||
|
||||
```cards
|
||||
basic.forever(() => {
|
||||
});
|
||||
led.plotBarGraph(input.acceleration(Dimension.Strength) - 1023, 0);
|
||||
led.plotBarGraph(pins.analogReadPin(AnalogPin.P0), 0);
|
||||
|
||||
```
|
||||
|
||||
## Objectives
|
||||
|
||||
* learn how to repeat code forever in the background
|
||||
* learn how to display a vertical bar graph based on the value.
|
||||
* learn how to return the sum of the two numbers
|
||||
* learn how to get acceleration value in milli-gravitys
|
||||
* learn how to read the connector value as analog as a value comprised between 0 and 1023
|
150
docs/lessons/seismograph/activity.md
Normal file
150
docs/lessons/seismograph/activity.md
Normal file
@ -0,0 +1,150 @@
|
||||
# Seismograph Activity
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
In this project, you will build your own seismograph.
|
||||
|
||||
## What you'll need:
|
||||
|
||||
* micro:bit
|
||||
* USB cable
|
||||
* Scissors
|
||||
* Glue gun
|
||||
* String
|
||||
* Cup (Plastic or Paper)
|
||||
* Magnet
|
||||
|
||||
Welcome! This activity will teach how to use the micro:bit to chart the strength of the acceleration. Let's get started!
|
||||
|
||||
1. Setup Cup: Use scissors to cut a usable window on the cup, which will be a square sized hole at the lid side of the cup. Use scissors to create a small hole in the center of the base of the cup.
|
||||
|
||||
2. Fasten Magnet: Fasten end of the string to the magnet with glue
|
||||
|
||||
3. Secure String: Fasten string to base of the cup and hang the remaining string outside the base of the cup.
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Seismograph built, let's code!
|
||||
|
||||
### ~
|
||||
|
||||
4. Go to Codemicrobit.com
|
||||
|
||||
Click or tap Create Code
|
||||
Click or tap Block Editor
|
||||
|
||||
### ~
|
||||
|
||||
5.
|
||||
|
||||
We will measure `acceleration (mg)` in terms of strength. Get the acceleration value (milli g-force), as measured in strength.
|
||||
|
||||
```blocks
|
||||
input.acceleration(Dimension.Strength);
|
||||
```
|
||||
|
||||
### ~
|
||||
|
||||
6.
|
||||
|
||||
Use the plot bar chart to visualize the acceleration on the LED screen of the micro:bit in the specified range. You implement plot Bar Graph to display a vertical bar graph based on the "value" and "high" value. Then you must insert acceleration in based on strength.
|
||||
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
led.plotBarGraph(input.acceleration(Dimension.Strength), 0);
|
||||
});
|
||||
|
||||
```
|
||||
|
||||
### ~
|
||||
|
||||
7.
|
||||
|
||||
Finally, we subtract the gravity from acceleration strength.
|
||||
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
led.plotBarGraph(input.acceleration(Dimension.Strength) - 1023, 0);
|
||||
});
|
||||
|
||||
```
|
||||
|
||||
### ~
|
||||
|
||||
8.
|
||||
|
||||
Notice that making vibrating the object below the micro:bit changes the values and the line appears as a wave to display the value of the strength as measured in milli-gravities. By making the object below the micro:bit vibrate, you will observe changing values of the micro:bit. Also, the LEDs shown on the Bar Graph fluctates based on the movement of the micro:bit strength.
|
||||
|
||||
NOTE: The black color reflects the micro:bit device.
|
||||
|
||||

|
||||
|
||||
|
||||
### ~
|
||||
|
||||
9.
|
||||
|
||||
Vigorously move the micro:bit in the micro:bit simulatator by moving the micro:bit image from side to side. Every time the micro:bit moves in the x direction in the simulator, you are generating data points that can be reviewed in Excel. The more attempts to move the micro:bit from side to side, the more data being saved in Excel. After you have vigarously moved the micro:bit simulator from side to side for a sufficient amount of time, you are ready to graph or chart the accceleration of the micro:bit. We want a printout of our acceleration on Excel that can be graphed in Excel.
|
||||
|
||||
|
||||
### ~
|
||||
|
||||
10.
|
||||
|
||||
We want to chart the data collected by using a tool in Excel.
|
||||
|
||||
The final part of this experiment is opening and reviewing the data in the Excel CSV file. Simply click on the line beneath the simulator. A CSV file will be generated to display the data points collected by moving the micro:bit in the X direction. Then click or tap on the data Excel file that was downloaded to your local Downloads Folder.
|
||||
|
||||
|
||||
### ~
|
||||
|
||||
10.
|
||||
|
||||
|
||||
First, click or tap on the first two columns (A, B) to include the time of the data being collected; b) the results of acceleration data on the micro:bit
|
||||
|
||||

|
||||
|
||||
Use the Recommended Charts command on the Insert tab to quickly create a chart that’s just right for your data.
|
||||
|
||||
* Select the data that you want to include in your chart.
|
||||
|
||||
* Click Insert > Recommended Charts.
|
||||
|
||||
### ~
|
||||
|
||||
11.
|
||||
|
||||
|
||||

|
||||
|
||||
* On the Recommended Charts tab, scroll through the list of chart types that Excel recommends for your data.
|
||||
|
||||
Click any chart type to see how your data will look in that format.
|
||||
|
||||
When you find the chart type that you want, click it, and then click OK. We want to select the chart called Line. A line chart is used to display trends over time. We will use the line chart because there are many data points over time.
|
||||
|
||||
Tip: If you don’t see a chart type that you want, click the All Charts tab to see all of the available chart types.
|
||||
|
||||
### ~
|
||||
|
||||
12.
|
||||
|
||||

|
||||
|
||||
* Use the Chart Elements, Chart Styles, and Chart Filters buttons next to the upper-right corner of the chart to add chart elements like axis titles or data labels, to customize the look of your chart
|
||||
|
||||
### ~
|
||||
|
||||
13.
|
||||
|
||||

|
||||
|
||||
* Connect a micro:bit to your computer using your USB cable; compile; and repeat this experiment by vibrating the micro:bit. Then chart the data on Excel.
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Excellent, you're ready to continue with the [challenges](/lessons/seismograph/challenge)
|
||||
|
||||
### ~
|
||||
|
@ -1,52 +1,4 @@
|
||||
# charting light
|
||||
|
||||
Measure the light level on the micro:bit from light to dark.
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Welcome! This activity will teach how to use the micro:bit to chart the light level from light to dark. Let's get started!
|
||||
|
||||
|
||||
### ~
|
||||
Let's measure the light level from dark to light. Get the acceleration value (milli g-force), in one of three specified dimensions.
|
||||
|
||||
|
||||
```blocks
|
||||
input.lightLevel()
|
||||
```
|
||||
|
||||
### ~
|
||||
Use the plot bar chart to visualize the acceleration on the LED screen of the micro:bit in the specified range. You implement plot Bar Graph to display a vertical bar graph based on the "value" and "high" value. Then you must insert acceleration in the X dimension to measure the acceleration.
|
||||
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
led.plotBarGraph(input.acceleration(Dimension.X), 0)
|
||||
})
|
||||
|
||||
```
|
||||
|
||||
### ~
|
||||
Notice that moving the micro:bit in the simulator from left to right (x direction) changes the values beneath the micro:bit in a range from 1023 to -1023 as measured in milli-gravities. By hovering over the micro:bit from left to right, you can observe changing values beneath the micro:bit simulator. Also, the LEDs shown on the Bar Graph fluctates based on the movement of the micro:bit simulator in the x direction. The line underneath the micro:bit simulator reflect the acceleration in the x direction.
|
||||
|
||||
NOTE: The colors of the charts reflect the color of the micro:bit simulator. In this instance, the micro:bit is yellow. So the color of the data line reflects the color of the micro:bit
|
||||
|
||||

|
||||
|
||||
### ~
|
||||
|
||||
Vigorously move the micro:bit in the micro:bit simulatator by moving the micro:bit image from side to side. Every time the micro:bit moves in the x direction in the simulator, you are generating data points that can be reviewed in Excel. The more attempts to move the micro:bit from side to side, the more data being saved in Excel. After you have vigarously moved the micro:bit simulator from side to side for a sufficient amount of time, you are ready to graph or chart the accceleration of the micro:bit. We want a printout of our acceleration on Excel that can be graphed in Excel.
|
||||
|
||||
### ~
|
||||
The final part of this experiment is opening and reviewing the data in the Excel CSV file. Simply click on the line beneath the simulator. A CSV file will be generated to display the data points collected by moving the micro:bit in the X direction. Then click or tap on the data Excel file that was downloaded to your local Downloads Folder.
|
||||
|
||||

|
||||
|
||||
### ~
|
||||
|
||||
* Review and write down your observations from the Excel data.
|
||||
* Chart the data collected by using a graph in Excel
|
||||
* Connect a micro:bit to your computer using your USB cable; compile; and move the micro:bit in the "x" direction.
|
||||
* Review and analyze the actual micro:bit device data on Excel
|
||||
# Challenge
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
@ -109,6 +61,28 @@ Finally, you must open the Excel CSV file by clicking on the data.xls file that
|
||||
|
||||

|
||||
|
||||
Use the Recommended Charts command on the Insert tab to quickly create a chart that’s just right for your data.
|
||||
|
||||
* Select the data that you want to include in your chart.
|
||||
|
||||
* Click Insert > Recommended Charts.
|
||||
|
||||

|
||||
|
||||
* On the Recommended Charts tab, scroll through the list of chart types that Excel recommends for your data.
|
||||
|
||||
Click any chart type to see how your data will look in that format.
|
||||
|
||||
When you find the chart type that you want, click it, and then click OK. We want to select the chart called Line. A line chart is used to display trends over time. We will use the line chart because there are many data points over time.
|
||||
|
||||
Tip: If you don’t see a chart type that you want, click the All Charts tab to see all of the available chart types.
|
||||
|
||||

|
||||
|
||||
* Use the Chart Elements, Chart Styles, and Chart Filters buttons next to the upper-right corner of the chart to add chart elements like axis titles or data labels, to customize the look of your chart
|
||||
|
||||

|
||||
|
||||
### ~
|
||||
Have fun reviewing your simulation and analyze the acceleration by chart the Excel data using Excel.
|
||||
|
||||
@ -116,3 +90,5 @@ Have fun reviewing your simulation and analyze the acceleration by chart the Exc
|
||||
* Connect the second micro:bit to your computer using your USB cable and run the charting script on it.
|
||||
* The first person and second person take turns tilting the micro:bit in the "x" direction while the other player charts the data on the micro:bit!
|
||||
* 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"
|
||||
|
BIN
docs/static/mb/blocks/crocodile-clips-1.jpg
vendored
Normal file
BIN
docs/static/mb/blocks/crocodile-clips-1.jpg
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 302 KiB |
BIN
docs/static/mb/crocodile-clips-2.jpg
vendored
Normal file
BIN
docs/static/mb/crocodile-clips-2.jpg
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 277 KiB |
BIN
docs/static/mb/line_chart.png
vendored
Normal file
BIN
docs/static/mb/line_chart.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 98 KiB |
10
docs/thank-you.md
Normal file
10
docs/thank-you.md
Normal file
@ -0,0 +1,10 @@
|
||||
# You completed the survey!
|
||||
|
||||
```sim
|
||||
basic.forever(() => { basic.showString("THANK YOU") })
|
||||
```
|
||||
|
||||
Thank you for participating in this survey.
|
||||
|
||||
Please contact Michael Braun at WW PS Edu [v-braum@microsoft.com](mailto:v-braum@microsoft.com)
|
||||
or Claudine O’Leary at WW PS Edu [clolea@microsoft.com](clolea@microsoft.com) with any information you think we might find useful.
|
@ -159,7 +159,7 @@ namespace control {
|
||||
/**
|
||||
* Gets a friendly name for the device derived from the its serial number
|
||||
*/
|
||||
//% blockId="control_device_name" block="device name" weight=10
|
||||
//% blockId="control_device_name" block="device name" weight=10 blockGap=8
|
||||
StringData* deviceName() {
|
||||
return ManagedString(microbit_friendly_name()).leakData();
|
||||
}
|
||||
@ -167,7 +167,7 @@ namespace control {
|
||||
/**
|
||||
* Derive a unique, consistent serial number of this device from internal data.
|
||||
*/
|
||||
//%
|
||||
//% blockId="control_device_serial_number" block="device serial number" weight=9
|
||||
int deviceSerialNumber() {
|
||||
return microbit_serial_number();
|
||||
}
|
||||
|
51
libs/microbit/messages.ts
Normal file
51
libs/microbit/messages.ts
Normal file
@ -0,0 +1,51 @@
|
||||
namespace messages {
|
||||
var streamid: string;
|
||||
|
||||
export function setStreamId(id: string) {
|
||||
streamid = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new message that includes the board serial number and the stream id if any
|
||||
*/
|
||||
export function createMessage() : Message {
|
||||
let m = new Message();
|
||||
m.addNumber('board', control.deviceSerialNumber());
|
||||
if (streamid != null && streamid.length > 0)
|
||||
m.addString('stream', streamid);
|
||||
return m;
|
||||
}
|
||||
|
||||
/**
|
||||
* A message containig custom data
|
||||
*/
|
||||
export class Message {
|
||||
private buffer:string = '';
|
||||
|
||||
/**
|
||||
* Adds a string field to the message
|
||||
*/
|
||||
//%
|
||||
public addString(name:string, value:string) {
|
||||
if (this.buffer.length > 0) this.buffer += ',';
|
||||
this.buffer += name + ':"' + value + '"';
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a number field to the message
|
||||
*/
|
||||
//%
|
||||
public addNumber(name:string, value: number) {
|
||||
if (this.buffer.length > 0) this.buffer += ',';
|
||||
this.buffer += name + ':' + value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts the message to a JSON payload
|
||||
*/
|
||||
//%
|
||||
public toJSON() : string {
|
||||
return '{' + this.buffer + '}';
|
||||
}
|
||||
}
|
||||
}
|
4
libs/microbit/shims.d.ts
vendored
4
libs/microbit/shims.d.ts
vendored
@ -346,13 +346,13 @@ declare namespace control {
|
||||
/**
|
||||
* Gets a friendly name for the device derived from the its serial number
|
||||
*/
|
||||
//% blockId="control_device_name" block="device name" weight=10 shim=control::deviceName
|
||||
//% blockId="control_device_name" block="device name" weight=10 blockGap=8 shim=control::deviceName
|
||||
function deviceName(): string;
|
||||
|
||||
/**
|
||||
* Derive a unique, consistent serial number of this device from internal data.
|
||||
*/
|
||||
//% shim=control::deviceSerialNumber
|
||||
//% blockId="control_device_serial_number" block="device serial number" weight=9 shim=control::deviceSerialNumber
|
||||
function deviceSerialNumber(): number;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pxt-microbit",
|
||||
"version": "0.2.93",
|
||||
"version": "0.2.97",
|
||||
"description": "BBC micro:bit target for PXT",
|
||||
"keywords": [
|
||||
"JavaScript",
|
||||
@ -29,6 +29,6 @@
|
||||
"typescript": "^1.8.7"
|
||||
},
|
||||
"dependencies": {
|
||||
"pxt-core": "0.2.101"
|
||||
"pxt-core": "0.2.107"
|
||||
}
|
||||
}
|
||||
|
@ -58,7 +58,7 @@
|
||||
},
|
||||
"runtime": {
|
||||
"mathBlocks": true,
|
||||
"loopBlocks": true,
|
||||
"loopsBlocks": true,
|
||||
"logicBlocks": true,
|
||||
"variablesBlocks": true
|
||||
},
|
||||
|
@ -233,6 +233,13 @@ namespace pxsim.control {
|
||||
? b.id.slice(0, 4)
|
||||
: 'abcd';
|
||||
}
|
||||
|
||||
export function deviceSerialNumber(): number {
|
||||
let b = board();
|
||||
return parseInt(b && b.id
|
||||
? b.id.slice(1)
|
||||
: '42');
|
||||
}
|
||||
|
||||
export function onEvent(id: number, evid: number, handler: RefAction) {
|
||||
pxt.registerWithDal(id, evid, handler)
|
||||
|
@ -511,7 +511,7 @@ namespace pxsim {
|
||||
|
||||
constructor() {
|
||||
super()
|
||||
this.id = "b" + Math.random().toString().slice(1);
|
||||
this.id = "b" +Math_.random(2147483647);
|
||||
this.animationQ = new AnimationQueue(runtime);
|
||||
this.bus = new EventBus(runtime);
|
||||
this.radio = new RadioBus(runtime);
|
||||
|
Reference in New Issue
Block a user