2017-06-29 16:47:26 +02:00
# 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:
2018-01-19 01:43:16 +01:00
```blocks
2018-01-31 17:28:00 +01:00
brick.buttonEnter.onEvent(ButtonEvent.Bumped, () => {
2018-02-19 16:35:08 +01:00
motors.largeA.run(50)
2017-06-29 16:47:26 +02:00
})
```
```typescript
2018-01-31 17:28:00 +01:00
brick.buttonEnter.onEvent(ButtonEvent.Bumped, () => {
2018-02-19 16:35:08 +01:00
motors.largeA.run(50)
2017-06-29 16:47:26 +02:00
})
```
2018-04-18 01:10:54 +02:00
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.
2017-06-29 16:47:26 +02:00
2018-02-03 18:09:10 +01:00
## Compile and Flash: Your Program!
2017-06-29 16:47:26 +02:00
2018-04-17 01:15:58 +02:00
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 @**).
2017-06-29 16:47:26 +02:00
Compilation to machine code from [Blocks ](/blocks ) or [JavaScript ](/javascript ) happens in the browser. You save the binary
2018-04-17 01:15:58 +02:00
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.
2017-06-29 16:47:26 +02:00
2018-03-28 17:50:14 +02:00
### ~ hint
2018-04-17 01:15:58 +02:00
Not seeing the ** @drivename @** drive? Make sure to upgrade your firmware at https://ev3manager.education.lego.com/. Try these [troubleshooting ](/troubleshoot ) tips if you still have trouble getting the drive to appear.
2018-03-28 17:50:14 +02:00
### ~
2017-06-29 16:47:26 +02:00
## Simulator: Test Your Code
2018-04-17 01:15:58 +02:00
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.
2017-06-29 16:47:26 +02:00
```sim
2018-01-31 17:28:00 +01:00
brick.buttonEnter.onEvent(ButtonEvent.Bumped, () => {
2018-02-19 16:35:08 +01:00
motors.largeA.run(50)
2018-04-17 01:15:58 +02:00
motors.mediumD.run(50)
sensors.touch1.pauseUntil(ButtonEvent.Pressed)
sensors.ultrasonic4.pauseUntil(UltrasonicSensorEvent.ObjectDetected)
2017-06-29 16:47:26 +02:00
})
2018-04-17 01:15:58 +02:00
```