loslegen
Deutsch   English   

1. SETUP

 

 

YOU LEARN HERE...

 

how to prepare your micro:bit for programming with WebTigerPython and how to run a programme with the micro:bit.

 

 

USB CONNECTION

 
Connect the micro:bit to the computer using the USB cable. MICROBIT appears as a new external drive (visible under Windows in the file explorer).  

Your Python programmes are downloaded to the micro:bit via USB and executed there with MicroPython. The micro:bit must have firmware installed for this. The firmware is pre-installed on new micro:bits. If this is not the case, or if you have already programmed the micro:bit with another tool, you must reinstall the firmware. You can find instructions on how to do this below in the Install firmware section.


A. Using the Chrome browser

It is best to start WebTigerPython with the Chrome browser. This supports WebUSB and access to the micro:bit from the browser.

Select Device - micro:bit under the three dots at the top right.

Click on the USB symbol in the title bar and then on ‘BBC micro:bitCMSIS-DAP’ and select Connect.

The micro:bit is now connected to your computer. A new yellow button will appear in the title bar, which you can use to download the programme.

For testing, enter a second line in the editor window:

from microbit import *
display.set_pixel (2, 2, 9)
sleep(2000)
display.clear()

Click on the yellow button to download the programme to the micro:bit and run it. The centre LED on the micro:bit should light up for 2 seconds (2000 milliseconds).

B. Using other browsers

If you are using a different browser, you must first download the programme prepared for micro:bit to your computer and then copy (move) it to the MICROBIT drive.

Start WebTigerPython and select Device - microbit under the three dots on the right. Add three more lines to the programme in the editor window and click on the Export code button.

You must then enter the programme name (e.g. Ex1). The Ex1.hex file prepared for the micro:bit will be downloaded to the download folder on your computer. Use the mouse to move this file to the MICROBIT drive. The programme starts automatically and the middle LED on the micro:bit lights up for 2 seconds.

 

 

INSTALL FIRMWARE

 

On the back of the micro:bit you can see whether you have a micro:bit V1 or micro:bit V2. The label ‘V2’ at the bottom right is only visible on micro:bit V2.

Download the ‘Firmware for V1’ or ‘Firmware for V2’ from the official micro:bit website: https://microbit.org/get-started/user-guide/firmware/

 


Press the reset button and connect the mirco:bit to the computer using the USB cable (keep the reset button pressed). A new drive appears in the file explorer.

Copy the hex file to this drive (drag it over with the mouse). The firmware is copied to the micro:bit and the micro:bit is ready for programming. In the same way, you can update or overwrite the firmware at any time if the micro:bit was previously programmed with another tool.

 

 

 

INPUT HELP

 

WebTigerPython-Editor provides a useful input help. Click on the arrow pointing outwards on the left-hand side of the editor window. A new window will appear in which you will find the documentation for the microbit module.

Here you can see the most important commands and can drag them into the editor window with the mouse.

 

 

REMEMBER YOU...

 

If the micro:bit is connected to the computer with the USB cable, it will be visible as an external drive. If you are using the Chrome browser, you can set up a download button in WebTigerPython. If you are using a different browser, you must download your programme to the download folder on your computer using the Export code button and then move it to the MICROBIT drive using the mouse.

If the programme download does not work as described above, you will need to install or update the firmware on your micro:bit.

 

 

ADDITIONAL REMARKS

 
Dein Programm bleibt so lange auf dem micro:bit gespeichert, bis du es mit einem neuen Programm überscheibst. Du kannst also den micro:bit beim Computer ausstecken und an eine andere Spannungsquelle anschliessen, beispielsweise an ein USB-Ladegerät oder eine PowerBank.

 

To run a programme several times, you can also click the reset button next to the USB socket instead of disconnecting the power supply.