pxt-ev3/docs/about.md
Peli de Halleux 352c1ca5ec
Experiment BT support using Chrome web serial (#920)
* plumbing

* plumbing

* logging

* more notes

* fixing typing

* more plumbing

* more plumbing

* different baud rate

* talking to the brick

* first over the air drop

* fix buffer

* tweak paraetmers

* formatting fixing double upload

* reduce console.log

* cleanup

* add BLE button to download dialog

* changed label

* recover from broken COM port

* fix function call

* reduce log level

* adding ticks

* some help

* updated support matrix

* more docs

* updated browser help

* more docs

* add link

* add device

* added image
2019-09-27 06:53:26 -07:00

47 lines
1.7 KiB
Markdown

# About
Welcome to the **Microsoft MakeCode** editor for the **@boardname@**!
## Programming: [Blocks](/blocks) or [JavaScript](/javascript)
You can program the @boardname@ using [Blocks](/blocks) or [JavaScript](/javascript) in your web browser:
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Bumped, () => {
motors.largeA.run(50)
})
```
```typescript
brick.buttonEnter.onEvent(ButtonEvent.Bumped, () => {
motors.largeA.run(50)
})
```
The editor works in [most modern browsers](/browsers). It works [offline](/offline) once loaded and doesn't require any installation. Take a look at some of the [features](/about/editor-features) of the editor.
## Compile and Flash: Your Program!
When you have your code ready, you connect your EV3 Brick to a computer with a USB cable so it appears as an attached drive (named **@drivename@**).
Compilation to machine code from [Blocks](/blocks) or [JavaScript](/javascript) happens in the browser. You save the binary
program to a **.uf2** file, which you then copy to the **@drivename@** drive. The process of copying will flash the device with the new program.
### ~ hint
**Experimental support** for Bluetooth download is now available. Please read the [Bluetooth](/bluetooth) page for more information.
### ~
## Simulator: Test Your Code
You can run your code using the @boardname@ simulator, all inside the same browser window.
The simulator has support for the EV3 Brick screen, buttons, sensors, and motors.
```sim
brick.buttonEnter.onEvent(ButtonEvent.Bumped, () => {
motors.largeA.run(50)
motors.mediumD.run(50)
sensors.touch1.pauseUntil(ButtonEvent.Pressed)
sensors.ultrasonic4.pauseUntil(UltrasonicSensorEvent.ObjectDetected)
})
```