Compare commits

..

16 Commits

Author SHA1 Message Date
365c95b33d 0.0.9 2016-03-28 23:29:26 -07:00
d05fa9f4cb Bump kindscript to 0.1.114 2016-03-28 23:29:25 -07:00
acb0c66e85 some edits to about 2016-03-28 23:18:27 -07:00
a705b74fab 0.0.8 2016-03-28 22:28:10 -07:00
85d406661a 0.0.7 2016-03-28 22:16:20 -07:00
8fa190b209 Bump kindscript to 0.1.113 2016-03-28 22:16:18 -07:00
664b841b1c updated enum annotation to support patching 2016-03-28 22:16:07 -07:00
715de4dff9 Merge branch 'master' of https://github.com/Microsoft/kindscript-microbit 2016-03-28 22:15:14 -07:00
514e7cf1db Target stuff now under /sim/ on localhost 2016-03-28 21:38:48 -07:00
c9f927b0bf no hats on advanced events 2016-03-28 20:56:09 -07:00
0802b509c4 0.0.6 2016-03-28 19:45:31 -07:00
383bdc491d Bump kindscript to 0.1.111 2016-03-28 19:45:29 -07:00
ffbbf56c1c 0.0.5 2016-03-28 19:03:58 -07:00
718ec896ab Remove private from package 2016-03-28 19:03:45 -07:00
0a919ded9a 0.0.4 2016-03-28 19:00:43 -07:00
8569f81128 Bump kindscript to 0.1.110 2016-03-28 19:00:41 -07:00
9 changed files with 108 additions and 115 deletions

View File

@ -1,14 +1,14 @@
# About # About
The [BBC micro:bit](https://www.microbit.co.uk) is a [pocket-size computer](/device) with 25 LEDs, Bluetooth and sensors that can be programmed by anyone. The [BBC micro:bit](https://www.microbit.co.uk) is a [pocket-size computer](/device) with a 5x5 display of 25 LEDs, Bluetooth and sensors that can be programmed by anyone.
The BBC micro:bit was made possible by [a number of partners!](https://www.microbit.co.uk/partners) The BBC micro:bit was made possible by many [partners](https://www.microbit.co.uk/partners).
The micro:bit provides a fun introduction to programming and making switch on, program it to do something fun wear it, customize it. The micro:bit provides a fun introduction to programming and making switch on, program it to do something fun wear it, customize it.
Just like Arduino, the micro:bit can be connected to and interact with sensors, displays, and other devices. Just like Arduino, the micro:bit can be connected to and interact with sensors, displays, and other devices.
## Block Editor or JavaScript ## Blocks or JavaScript
The student can program the BBC micro:bit using a Block Editor or JavaScript. The student can program the BBC micro:bit using [visual blocks](http://www.github.com/Google/blockly) or JavaScript.
```blocks ```blocks
basic.showString("BBC micro:bit!"); basic.showString("BBC micro:bit!");
@ -46,16 +46,9 @@ input.onGesture(Gesture.Shake, () => {
}); });
``` ```
To run a student's project in the web browser, KindScript compiles it into JavaScript, the scripting language built into all web browsers.
C++ and Touch Develop Libraries
The C++ micro:bit library, created at Lancaster University, provides access to the hardware functions of the micro:bit, as well as a set of helper functions (such as displaying a number/image/string on the LED screen). The Touch Develop micro:bit library mirrors the functions of the C++ library. When a Touch Develop script is compiled to C++, the calls to Touch Develop micro:bit functions are replaced with calls to the corresponding C++ functions.
Above, see the mapping from the Touch Develop "show number" function to its corresponding the C++ function.
## C++ Runtime ## C++ Runtime
The C++ BBC micro:bit library, created at [Lancaster University](http://www.lancaster.ac.uk/), provides access to the hardware functions of the micro:bit, The C++ BBC micro:bit library, created at [Lancaster University](http://www.lancaster.ac.uk/), provides access to the hardware functions of the micro:bit,
as well as a set of helper functions (such as displaying a number/image/string on the LED screen). as well as a set of helper functions (such as displaying a number/image/string on the LED screen).
The JavaScript micro:bit library mirrors the functions of the C++ library. The JavaScript micro:bit library mirrors the functions of the C++ library.
When code is compiled to C++, the calls to JavaScript micro:bit functions are replaced with calls to the corresponding C++ functions. When code is compiled to ARM machine code, the calls to JavaScript micro:bit functions are replaced with calls to the corresponding C++ functions.

View File

@ -1,117 +1,117 @@
enum MesCameraEvent { enum MesCameraEvent {
//% enumval=MES_CAMERA_EVT_TAKE_PHOTO blockId="take photo" //% enumval=MES_CAMERA_EVT_TAKE_PHOTO block="take photo"
TakePhoto, TakePhoto,
//% enumval=MES_CAMERA_EVT_START_VIDEO_CAPTURE blockId="start video capture" //% enumval=MES_CAMERA_EVT_START_VIDEO_CAPTURE block="start video capture"
StartVideoCapture, StartVideoCapture,
//% enumval=MES_CAMERA_EVT_STOP_VIDEO_CAPTURE blockId="stop video capture" //% enumval=MES_CAMERA_EVT_STOP_VIDEO_CAPTURE block="stop video capture"
StopVideoCapture, StopVideoCapture,
//% enumval=MES_CAMERA_EVT_TOGGLE_FRONT_REAR blockId="toggle front-rear" //% enumval=MES_CAMERA_EVT_TOGGLE_FRONT_REAR block="toggle front-rear"
ToggleFrontRear, ToggleFrontRear,
//% enumval=MES_CAMERA_EVT_LAUNCH_PHOTO_MODE blockId="launch photo mode" //% enumval=MES_CAMERA_EVT_LAUNCH_PHOTO_MODE block="launch photo mode"
LaunchPhotoMode, LaunchPhotoMode,
//% enumval=MES_CAMERA_EVT_LAUNCH_VIDEO_MODE blockId="launch video mode" //% enumval=MES_CAMERA_EVT_LAUNCH_VIDEO_MODE block="launch video mode"
LaunchVideoMode, LaunchVideoMode,
//% enumval=MES_CAMERA_EVT_STOP_PHOTO_MODE blockId="stop photo mode" //% enumval=MES_CAMERA_EVT_STOP_PHOTO_MODE block="stop photo mode"
StopPhotoMode, StopPhotoMode,
//% enumval=MES_CAMERA_EVT_STOP_VIDEO_MODE blockId="stop video mode" //% enumval=MES_CAMERA_EVT_STOP_VIDEO_MODE block="stop video mode"
StopVideoMode, StopVideoMode,
} }
enum MesAlertEvent { enum MesAlertEvent {
//% enumval=MES_ALERT_EVT_DISPLAY_TOAST blockId="display toast" //% enumval=MES_ALERT_EVT_DISPLAY_TOAST block="display toast"
DisplayToast, DisplayToast,
//% enumval=MES_ALERT_EVT_VIBRATE blockId="vibrate" //% enumval=MES_ALERT_EVT_VIBRATE block="vibrate"
Vibrate, Vibrate,
//% enumval=MES_ALERT_EVT_PLAY_SOUND blockId="play sound" //% enumval=MES_ALERT_EVT_PLAY_SOUND block="play sound"
PlaySound, PlaySound,
//% enumval=MES_ALERT_EVT_PLAY_RINGTONE blockId="play ring tone" //% enumval=MES_ALERT_EVT_PLAY_RINGTONE block="play ring tone"
PlayRingtone, PlayRingtone,
//% enumval=MES_ALERT_EVT_FIND_MY_PHONE blockId="find my phone" //% enumval=MES_ALERT_EVT_FIND_MY_PHONE block="find my phone"
FindMyPhone, FindMyPhone,
//% enumval=MES_ALERT_EVT_ALARM1 blockId="ring alarm" //% enumval=MES_ALERT_EVT_ALARM1 block="ring alarm"
RingAlarm, RingAlarm,
//% enumval=MES_ALERT_EVT_ALARM2 blockId="ring alarm 2" //% enumval=MES_ALERT_EVT_ALARM2 block="ring alarm 2"
RingAlarm2, RingAlarm2,
//% enumval=MES_ALERT_EVT_ALARM3 blockId="ring alarm 3" //% enumval=MES_ALERT_EVT_ALARM3 block="ring alarm 3"
RingAlarm3, RingAlarm3,
//% enumval=MES_ALERT_EVT_ALARM4 blockId="ring alarm 4" //% enumval=MES_ALERT_EVT_ALARM4 block="ring alarm 4"
RingAlarm4, RingAlarm4,
//% enumval=MES_ALERT_EVT_ALARM5 blockId="ring alarm 5" //% enumval=MES_ALERT_EVT_ALARM5 block="ring alarm 5"
RingAlarm5, RingAlarm5,
//% enumval=MES_ALERT_EVT_ALARM6 blockId="ring alarm 6" //% enumval=MES_ALERT_EVT_ALARM6 block="ring alarm 6"
RingAlarm6, RingAlarm6,
} }
enum MesDeviceInfo { enum MesDeviceInfo {
//% enumval=MES_DEVICE_INCOMING_CALL blockId="incoming call" //% enumval=MES_DEVICE_INCOMING_CALL block="incoming call"
IncomingCall, IncomingCall,
//% enumval=MES_DEVICE_INCOMING_MESSAGE blockId="incoming message" //% enumval=MES_DEVICE_INCOMING_MESSAGE block="incoming message"
IncomingMessage, IncomingMessage,
//% enumval=MES_DEVICE_ORIENTATION_LANDSCAPE blockId="orientation landscape" //% enumval=MES_DEVICE_ORIENTATION_LANDSCAPE block="orientation landscape"
OrientationLandscape, OrientationLandscape,
//% enumval=MES_DEVICE_ORIENTATION_PORTRAIT blockId="orientation portrait" //% enumval=MES_DEVICE_ORIENTATION_PORTRAIT block="orientation portrait"
OrientationPortrait, OrientationPortrait,
//% enumval=MES_DEVICE_GESTURE_DEVICE_SHAKEN blockId="shaken" //% enumval=MES_DEVICE_GESTURE_DEVICE_SHAKEN block="shaken"
Shaken, Shaken,
//% enumval=MES_DEVICE_DISPLAY_OFF blockId="display off" //% enumval=MES_DEVICE_DISPLAY_OFF block="display off"
DisplayOff, DisplayOff,
//% enumval=MES_DEVICE_DISPLAY_ON blockId="display on" //% enumval=MES_DEVICE_DISPLAY_ON block="display on"
DisplayOn, DisplayOn,
} }
enum MesRemoteControlEvent { enum MesRemoteControlEvent {
//% enumval=MES_REMOTE_CONTROL_EVT_PLAY blockId="play" //% enumval=MES_REMOTE_CONTROL_EVT_PLAY block="play"
play, play,
//% enumval=MES_REMOTE_CONTROL_EVT_PAUSE blockId="pause" //% enumval=MES_REMOTE_CONTROL_EVT_PAUSE block="pause"
pause, pause,
//% enumval=MES_REMOTE_CONTROL_EVT_STOP blockId="stop" //% enumval=MES_REMOTE_CONTROL_EVT_STOP block="stop"
stop, stop,
//% enumval=MES_REMOTE_CONTROL_EVT_NEXTTRACK blockId="next track" //% enumval=MES_REMOTE_CONTROL_EVT_NEXTTRACK block="next track"
nextTrack, nextTrack,
//% enumval=MES_REMOTE_CONTROL_EVT_PREVTRACK blockId="previous track" //% enumval=MES_REMOTE_CONTROL_EVT_PREVTRACK block="previous track"
previousTrack, previousTrack,
//% enumval=MES_REMOTE_CONTROL_EVT_FORWARD blockId="forward" //% enumval=MES_REMOTE_CONTROL_EVT_FORWARD block="forward"
forward, forward,
//% enumval=MES_REMOTE_CONTROL_EVT_REWIND blockId="rewind" //% enumval=MES_REMOTE_CONTROL_EVT_REWIND block="rewind"
rewind, rewind,
//% enumval=MES_REMOTE_CONTROL_EVT_VOLUMEUP blockId="volume up" //% enumval=MES_REMOTE_CONTROL_EVT_VOLUMEUP block="volume up"
volumeUp, volumeUp,
//% enumval=MES_REMOTE_CONTROL_EVT_VOLUMEDOWN blockId="volume down" //% enumval=MES_REMOTE_CONTROL_EVT_VOLUMEDOWN block="volume down"
volumeDown, volumeDown,
} }
enum MesDpadButtonInfo { enum MesDpadButtonInfo {
//% enumval=MES_DPAD_BUTTON_A_DOWN blockId="A down" //% enumval=MES_DPAD_BUTTON_A_DOWN block="A down"
ADown, ADown,
//% enumval=MES_DPAD_BUTTON_A_UP blockId="A up" //% enumval=MES_DPAD_BUTTON_A_UP block="A up"
AUp, AUp,
//% enumval=MES_DPAD_BUTTON_B_DOWN blockId="B down" //% enumval=MES_DPAD_BUTTON_B_DOWN block="B down"
BDown, BDown,
//% enumval=MES_DPAD_BUTTON_B_UP blockId="B up" //% enumval=MES_DPAD_BUTTON_B_UP block="B up"
BUp, BUp,
//% enumval=MES_DPAD_BUTTON_C_DOWN blockId="C down" //% enumval=MES_DPAD_BUTTON_C_DOWN block="C down"
CDown, CDown,
//% enumval=MES_DPAD_BUTTON_C_UP blockId="C up" //% enumval=MES_DPAD_BUTTON_C_UP block="C up"
CUp, CUp,
//% enumval=MES_DPAD_BUTTON_D_DOWN blockId="D down" //% enumval=MES_DPAD_BUTTON_D_DOWN block="D down"
DDown, DDown,
//% enumval=MES_DPAD_BUTTON_D_UP blockId="D up" //% enumval=MES_DPAD_BUTTON_D_UP block="D up"
DUp, DUp,
//% enumval=MES_DPAD_BUTTON_1_UP blockId="1 down" //% enumval=MES_DPAD_BUTTON_1_UP block="1 down"
_1Down, _1Down,
//% enumval=MES_DPAD_BUTTON_1_DOWN blockId="1 up" //% enumval=MES_DPAD_BUTTON_1_DOWN block="1 up"
_1Up, _1Up,
//% enumval=MES_DPAD_BUTTON_2_DOWN blockId="2 down" //% enumval=MES_DPAD_BUTTON_2_DOWN block="2 down"
_2Down, _2Down,
//% enumval=MES_DPAD_BUTTON_2_UP blockId="2 up" //% enumval=MES_DPAD_BUTTON_2_UP block="2 up"
_2Up, _2Up,
//% enumval=MES_DPAD_BUTTON_3_DOWN blockId="3 down" //% enumval=MES_DPAD_BUTTON_3_DOWN block="3 down"
_3Down, _3Down,
//% enumval=MES_DPAD_BUTTON_3_UP blockId="3 up" //% enumval=MES_DPAD_BUTTON_3_UP block="3 up"
_3Up, _3Up,
//% enumval=MES_DPAD_BUTTON_4_DOWN blockId="4 down" //% enumval=MES_DPAD_BUTTON_4_DOWN block="4 down"
_4Down, _4Down,
//% enumval=MES_DPAD_BUTTON_4_UP blockId="4 up" //% enumval=MES_DPAD_BUTTON_4_UP block="4 up"
_4Up, _4Up,
} }

View File

@ -220,7 +220,8 @@ namespace control {
* Raises an event in the event bus. * Raises an event in the event bus.
*/ */
// shim=micro_bit::onBusEvent // shim=micro_bit::onBusEvent
//% weight=20 blockGap=8 blockId="control_on_event" block="on event|from %src=control_event_source|with value %value=control_event_value" blockExternalInputs=1 //% weight=20 blockGap=8 blockId="control_on_event" block="on event|from %src=control_event_source|with value %value=control_event_value"
//% blockExternalInputs=1 blockStatement=1
export function onEvent(src: number, value: number, handler: Action): void { } export function onEvent(src: number, value: number, handler: Action): void { }
/** /**

View File

@ -1,20 +1,20 @@
enum Direction { enum Direction {
//% blockId=right //% block=right
Right, Right,
//% blockId=left //% block=left
Left Left
} }
enum LedSpriteProperty { enum LedSpriteProperty {
//% blockId=x //% block=x
X, X,
//% blockId=y //% block=y
Y, Y,
//% blockId=direction //% block=direction
Direction, Direction,
//% blockId=brightness //% block=brightness
Brightness, Brightness,
//% blockId=blink //% block=blink
Blink Blink
} }

View File

@ -4,25 +4,25 @@ enum Button {
//% enumval=MICROBIT_ID_BUTTON_B //% enumval=MICROBIT_ID_BUTTON_B
B, B,
//% enumval=MICROBIT_ID_BUTTON_AB //% enumval=MICROBIT_ID_BUTTON_AB
//% blockId="A+B" block="A+B" //% block="A+B"
AB, AB,
} }
enum Dimension { enum Dimension {
//% enumval=0 blockId=x //% enumval=0 block=x
X, X,
//% enumval=1 blockId=y //% enumval=1 block=y
Y, Y,
//% enumval=2 blockId=z //% enumval=2 block=z
Z, Z,
//% enumval=3 blockId=strength //% enumval=3 block=strength
Strength, Strength,
} }
enum Rotation { enum Rotation {
//% enumval=0 blockId=pitch //% enumval=0 block=pitch
Pitch, Pitch,
//% enumval=1 blockId=roll //% enumval=1 block=roll
Roll, Roll,
} }
@ -39,22 +39,22 @@ enum AcceleratorRange {
/** /**
* The accelerator measures forces up to 1 gravity * The accelerator measures forces up to 1 gravity
*/ */
//% blockId="1g" enumval=1 //% block="1g" enumval=1
OneG, OneG,
/** /**
* The accelerator measures forces up to 2 gravity * The accelerator measures forces up to 2 gravity
*/ */
//% blockId="2g" enumval=2 //% block="2g" enumval=2
TwoG, TwoG,
/** /**
* The accelerator measures forces up to 4 gravity * The accelerator measures forces up to 4 gravity
*/ */
//% blockId="4g" enumval=4 //% block="4g" enumval=4
FourG, FourG,
/** /**
* The accelerator measures forces up to 8 gravity * The accelerator measures forces up to 8 gravity
*/ */
//% blockId="8g" enumval=8 //% block="8g" enumval=8
EightG EightG
} }
@ -80,42 +80,42 @@ enum Gesture {
/** /**
* Raised when shaken * Raised when shaken
*/ */
//% blockId=shake enumval=11 //% block=shake enumval=11
Shake, Shake,
/** /**
* Raised when the logo is upward and the screen is vertical * Raised when the logo is upward and the screen is vertical
*/ */
//% blockId="logo up" enumval=1 //% block="logo up" enumval=1
LogoUp, LogoUp,
/** /**
* Raised when the logo is downward and the screen is vertical * Raised when the logo is downward and the screen is vertical
*/ */
//% blockId="logo down" enumval=2 //% block="logo down" enumval=2
LogoDown, LogoDown,
/** /**
* Raised when the screen is pointing down and the board is horizontal * Raised when the screen is pointing down and the board is horizontal
*/ */
//% blockId="screen up" enumval=5 //% block="screen up" enumval=5
ScreenUp, ScreenUp,
/** /**
* Raised when the screen is pointing up and the board is horizontal * Raised when the screen is pointing up and the board is horizontal
*/ */
//% blockId="screen down" enumval=6 //% block="screen down" enumval=6
ScreenDown, ScreenDown,
/** /**
* Raised when the screen is pointing left * Raised when the screen is pointing left
*/ */
//% blockId="tilt left" enumval=3 //% block="tilt left" enumval=3
TiltLeft, TiltLeft,
/** /**
* Raised when the screen is pointing right * Raised when the screen is pointing right
*/ */
//% blockId="tilt right" enumval=4 //% block="tilt right" enumval=4
TiltRight, TiltRight,
/** /**
* Raised when the board is falling! * Raised when the board is falling!
*/ */
//% blockId="free fall" enumval=7 //% block="free fall" enumval=7
FreeFall FreeFall
} }

View File

@ -1,7 +1,7 @@
enum DisplayMode { enum DisplayMode {
//% enumval=0 blockId="black and white" //% enumval=0 block="black and white"
BackAndWhite, BackAndWhite,
//% enumval=1 blockId="greyscale" //% enumval=1 block="greyscale"
Greyscale, Greyscale,
} }

View File

@ -1,7 +1,7 @@
enum Note { enum Note {
//% enumval=262 //% enumval=262
C, C,
//% enumval=277 blockId=C# //% enumval=277 block=C#
CSharp, CSharp,
//% enumval=294 //% enumval=294
D, D,
@ -11,11 +11,11 @@ enum Note {
E, E,
//% enumval=349 //% enumval=349
F, F,
//% enumval=370 blockId=F# //% enumval=370 block=F#
FSharp, FSharp,
//% enumval=392 //% enumval=392
G, G,
//% enumval=415 blockId=G# //% enumval=415 block=G#
GSharp, GSharp,
//% enumval=440 //% enumval=440
A, A,
@ -25,7 +25,7 @@ enum Note {
B, B,
//% enumval=131 //% enumval=131
C3, C3,
//% enumval=139 blockId=C#3 //% enumval=139 block=C#3
CSharp3, CSharp3,
//% enumval=147 //% enumval=147
D3, D3,
@ -35,11 +35,11 @@ enum Note {
E3, E3,
//% enumval=175 //% enumval=175
F3, F3,
//% enumval=185 blockId=F#3 //% enumval=185 block=F#3
FSharp3, FSharp3,
//% enumval=196 //% enumval=196
G3, G3,
//% enumval=208 blockId=G#3 //% enumval=208 block=G#3
GSharp3, GSharp3,
//% enumval=220 //% enumval=220
A3, A3,
@ -49,7 +49,7 @@ enum Note {
B3, B3,
//% enumval=262 //% enumval=262
C4, C4,
//% enumval=277 blockId=C#4 //% enumval=277 block=C#4
CSharp4, CSharp4,
//% enumval=294 //% enumval=294
D4, D4,
@ -59,11 +59,11 @@ enum Note {
E4, E4,
//% enumval=349 //% enumval=349
F4, F4,
//% enumval=370 blockId=F#3 //% enumval=370 block=F#3
FSharp4, FSharp4,
//% enumval=392 //% enumval=392
G4, G4,
//% enumval=415 blockId=G#3 //% enumval=415 block=G#3
GSharp4, GSharp4,
//% enumval=440 //% enumval=440
A4, A4,
@ -73,7 +73,7 @@ enum Note {
B4, B4,
//% enumval=523 //% enumval=523
C5, C5,
//% enumval=555 blockId=C#5 //% enumval=555 block=C#5
CSharp5, CSharp5,
//% enumval=587 //% enumval=587
D5, D5,
@ -83,11 +83,11 @@ enum Note {
E5, E5,
//% enumval=698 //% enumval=698
F5, F5,
//% enumval=740 blockId=F#5 //% enumval=740 block=F#5
FSharp5, FSharp5,
//% enumval=784 //% enumval=784
G5, G5,
//% enumval=831 blockId=G#5 //% enumval=831 block=G#5
GSharp5, GSharp5,
//% enumval=880 //% enumval=880
A5, A5,
@ -98,15 +98,15 @@ enum Note {
} }
enum BeatFraction { enum BeatFraction {
//% enumval=1 blockId=1 //% enumval=1 block=1
Whole = 1, Whole = 1,
//% enumval=2 blockId="1/2" //% enumval=2 block="1/2"
Half = 2, Half = 2,
//% enumval=4 blockId="1/4" //% enumval=4 block="1/4"
Quater = 4, Quater = 4,
//% enumval=8 blockId="1/8" //% enumval=8 block="1/8"
Eighth = 8, Eighth = 8,
//% enumval=16 blockId="1/16" //% enumval=16 block="1/16"
Sixteenth = 16 Sixteenth = 16
} }

View File

@ -1,7 +1,6 @@
{ {
"name": "kindscript-microbit", "name": "kindscript-microbit",
"version": "0.0.3", "version": "0.0.9",
"private": true,
"description": "BBC micro:bit target for KindScript", "description": "BBC micro:bit target for KindScript",
"keywords": [ "keywords": [
"JavaScript", "JavaScript",
@ -31,6 +30,6 @@
"typescript": "^1.8.7" "typescript": "^1.8.7"
}, },
"dependencies": { "dependencies": {
"kindscript": "0.1.107" "kindscript": "0.1.114"
} }
} }

View File

@ -10,9 +10,9 @@
overflow: hidden; overflow: hidden;
} }
</style> </style>
<script type="text/javascript" src="./bluebird.min.js"></script> <script src="/cdn/bluebird.min.js"></script>
<script type="text/javascript" src="./kindsim.js"></script> <script src="/cdn/kindsim.js"></script>
<script type="text/javascript" src="./sim.js"></script> <script src="/sim/sim.js"></script>
</head> </head>
<body> <body>