HomeTurtlegraficsGPanelRobotics WebTigerPython |
Python - Online |
Deutsch English |
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 |
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 browserIt 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 browsersIf 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 |
|
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 |
To run a programme several times, you can also click the reset button next to the USB socket instead of disconnecting the power supply. |