Skip to content Skip to sidebar Skip to footer

Progamming Code to Upload Stuff Onto the Internjet

How practise I transfer my code onto the micro:chip via USB Print

Modified on: Wed, nine Jun, 2021 at ane:58 PM


Yous tin follow our elementary guide in the Quick Start section of the website.  The process of transferring code is called Flashing. Once the micro:bit has been flashed, the code will run automatically.

The micro:scrap can only run one programme at a time - every fourth dimension you drag-and-drop a hex file onto the device over USB information technology will erase the current plan and replace it with the new ane. If you want to reset your micro:chip to it's 'out of the box' state, flash the original .hex file that came with your device.

To wink the programme via the USB connection, you'll need the following things:

  • A Micro USB cablevision to connect your computer to your micro: bit.This is the same cable that is unremarkably used to connect a smartphone to a calculator (brand certain that information technology can transfer information every bit well as power).
  • A Reckoner running Windows seven or later, Mac OS 10 ten.6 or subsequently, Linux or Chrome OS
  • Access to the Internet

Step 1: Connect your BBC micro:bit to your computer

  1. Connect the minor end of the USB cable to the micro USB port on your BBC micro:fleck
  2. Connect the other stop of the USB cable to a USB port on your computer.

On computers running Windows, MICROBIT appears as a bulldoze under Devices and drives.

On a MacMICROBIT appears as a new drive nether Devices.

On a Chromebook MICROBIT volition appear every bit a new device in file manager On LinuxMICROBIT will be mounted every bit a drive eg at /media/pi/MICROBIT

Step 2: Compile your program

Compiling translates code from high level programming languages similar Javascript and Python to low level auto code that the micro:bit can interpret. When you download a file from one of the editors, it is compiled in the browser and downloaded as a .HEX file.

Using the editor of your selection, select download  and if prompted, cull to save the compiled file on your computer (or anywhere other than the BBC micro:fleck).

Windows Border


Select Download. When asked what to exercise with this file, select Save and it will be saved to your Downloads folder. Selecting Open Folder volition allow you to view your downloads

Mac Safari


When you select Download in Safari, your file will apppear under downlaods in the top right of the screen, you can open your downloads folder from here.

Chrome

This is the same procedure on Windows and Mac. Select Download and your .hex file will announced as a download at the lesser of the browser.

Right click on the download and select evidence in binder.

Step 3: Flash the file to your BBC micro:flake

 The process of transferring the .HEX file to the BBC micro:bit is called flashing. To flash the file, simply drag and drop it on to the micro:flake bulldoze from the file explorer or finder window. Here'south a video of the process


  • The LED on the back of your BBC micro:bit flashes during the transfer (which should only accept a few seconds).
  • Once transferred, the code will run automatically on your BBC micro:scrap. To rerun your plan, printing the reset push button on the back of your BBC micro:bit. The reset button automatically runs the newest file on the BBC micro:scrap.
  • By copying the program onto the 'MICROBIT' drive, you have programmed it into the flash retentiveness on the micro:scrap, which means even later you unplug the micro:bit, your program volition still run if the micro:bit is powered by battery.

Troubleshooting

  • Y'all can't drag and drop more than than i hex file at one time onto your micro:bit. If you effort to drag and drop a 2d hex file onto your micro:bit before the first file has finished downloading, so the second file may fail in different means.
  • When the showtime program has been written to the micro:bit, the bulldoze will squirt. If you lot elevate and drib a second file at this point it may not find the bulldoze and the second write will fail.

The errors may look like this:

Windows

Mac

Or information technology may announced that there are ii hex files on your BBC micro:bit and then the micro:bit won't exist able to run multiple files. To rectify this, unplug your micro:bit and plug it in again. Make sure that your micro:scrap appears as a MICROBIT drive and not MAINTENANCE.

Further data

Here are instructions for the MakeCode Editor using different browsers on Windows and Mac computers. Choose the i you're using:

Windows browsers

  • Microsoft Edge
  • Internet Explorer
  • Chrome
  • Firefox

Mac browsers

  • Safari
  • Chrome
  • Firefox
  • If you're using the device in a school surroundings, you lot may need to bank check with your network administrator that yous have the correct permissions to write to the device.
  • You tin can only transfer ane hex file at a fourth dimension onto your BBC micro:bit.

Y'all tin can also transfer lawmaking via Bluetooth.



Did you find it helpful? Yeah No

Send feedback

jonestepateady.blogspot.com

Source: https://support.microbit.org/support/solutions/articles/19000013986-how-do-i-transfer-my-code-onto-the-micro-bit-via-usb

Enregistrer un commentaire for "Progamming Code to Upload Stuff Onto the Internjet"