918af4f3ac
* change simulator svg * change radio image * Remove google fonts cdn * change color of 'advanced' button * font fix * font fix 2 * display fix * change fullsceen simulator bg * Continuous servo * handle continuous state * adding shims * update rendering for continuous servos * fixing sim * fix sig * typo * fix sim * bump pxt * bump pxt * rerun travis * Input blocks revision - add Button and Pin event types - merge onPinPressed & onPinReleased in new onPinEvent function - create new onButtonEvent function * update input blocks in docs and tests * remove device_pin_release block * Hide DAL.x behind Enum * bring back deprecated blocks, but hide them * shims and locales files * fix input.input. typing * remove buildpr * bump V3 * update simulator aspect ratio * add Loudness Block * revoke loudness block * Adds soundLevel To be replaced by pxt-common-packages when DAL is updated. * Remove P0 & P3 from AnalogPin Co-authored-by: Juri <gitkraken@juriwolf.de>
72 lines
2.8 KiB
Markdown
72 lines
2.8 KiB
Markdown
# Uploading from Firefox on Windows
|
|
|
|
How to compile, transfer, and run a program on your micro:bit on **Firefox for Windows**.
|
|
|
|
While you're writing and testing your programs, you'll mostly be [running them
|
|
in the simulator](/device/simulator), but once you've finished your program you
|
|
can **compile** it and run it on your micro:bit.
|
|
|
|
The basic steps are:
|
|
|
|
1. Connect your micro:bit to your computer via USB
|
|
2. Click **Download** and download the `.hex` file
|
|
3. Click the **Save As** button and save the `.hex` file into the MICROBIT drive
|
|
|
|
## Requirements
|
|
|
|
You need the following things to transfer and run a script on your micro:bit:
|
|
|
|
* A-Male to Micro USB cable to connect your computer to your micro:bit. This is
|
|
the same cable that is commonly used to connect a smart phone to a computer.
|
|
* A PC running Windows 7 or later, or a Mac running OS X 10.6 or later
|
|
|
|
## Step 1: Connect your micro:bit to your computer
|
|
|
|
First, connect the micro:bit:
|
|
|
|
1. Connect the small end of the USB cable to the micro USB port on your micro:bit.
|
|
|
|
2. Connect the other end of the USB cable to a USB port on your computer.
|
|
|
|
Your computer should recognise your micro:bit as a new drive. On computers
|
|
running Windows, `MICROBIT` appears as a drive under Devices and drives. On a Mac
|
|
it appears as a new drive under Devices.
|
|
|
|
![](/static/mb/device/usb-windows-device.jpg)
|
|
|
|
## Step 2: Download your program
|
|
|
|
1. Open your project on @homeurl@.
|
|
2. Click **Download**.
|
|
3. When prompted, choose to **save** the compiled file onto your computer. The
|
|
prompt will be different depending on which browser you are using, or
|
|
whether you are using a Windows computer or a Mac.
|
|
|
|
![Save download file dialog](/static/mb/device/usb/save-file-firefox.gif)
|
|
|
|
A window may appear asking whether you want to save or open the `.hex` file. If it doesn't, go click on the downloads icon at the top of the browser.
|
|
|
|
![Save file prompt](/static/mb/device/usb/open-file-firefox.png)
|
|
|
|
Click the folder icon and copy the file from the list of downloads to the **MICROBIT** drive.
|
|
|
|
![Move hex file to MICROBIT drive](/static/mb/device/usb/move-hex-file-firefox.png)
|
|
|
|
## Step 3: Transfer the file to your micro:bit
|
|
|
|
* The LED on the back of your micro:bit flashes during the transfer (which
|
|
should only take a few seconds).
|
|
* Once transferred, the code will run automatically on your @boardname@. To rerun
|
|
your program, press the reset button on the back of your @boardname@. The reset
|
|
button automatically runs the newest file on the micro:bit.
|
|
|
|
By copying the script onto the `MICROBIT` drive, you have programmed it into the
|
|
flash memory on the micro:bit, which means even after you unplug the micro:bit,
|
|
your program will still run if the micro:bit is powered by battery.
|
|
|
|
## ~hint
|
|
|
|
Transfer not working? See some [troubleshooting tips](/device/usb/troubleshoot).
|
|
|
|
## ~
|