Fix stuck pixel on a USB DAC in South Africa
Stuck pixel on a usb dac usually needs a settings, driver, thermal, or power check first. Work through safe SA troubleshooting steps before replacing parts or assuming a full upgrade.
Read moreMoving from blocks to text on the micro:bit requires switching from MakeCode to the dedicated micro:bit Python Editor, because MicroPython APIs are incompatible with MakeCode's separate interpreter. The official editor at python.microbit.org is the correct environment.
You have built a few projects in MakeCode, the colourful drag-and-drop blocks feel limiting, and you want to write actual Python on your micro:bit. Good instinct. But there is a trap that catches almost everyone: you cannot just flip a switch inside MakeCode. The blocks and the text live in two different editors with two different interpreters, and moving across means changing tools, not toggling a mode.
To go from blocks to text on the micro:bit, stop using MakeCode and switch to the official micro:bit Python Editor at python.microbit.org. MakeCode's "Python" view is its own JavaScript-derived language, not MicroPython, so the two are not compatible. The Python Editor runs real MicroPython, which is the path to genuine text coding.
This is the part that confuses people, so it is worth being precise. MakeCode has a Python tab. It looks like Python and reads like Python. But under the hood MakeCode converts everything to its own interpreter, and that "Python" is a static, JavaScript-derived dialect. It is not MicroPython.
The micro:bit Python Editor runs true MicroPython, a compact version of Python 3 built to run on microcontrollers. The two use different APIs, different module structures, and different ways of talking to the hardware. Code from one will not run unchanged in the other. So when you decide to learn "real" Python on the micro:bit, you are not upgrading MakeCode, you are moving house. If you are kitting out a classroom or a maker space, the micro:bit and accessory kits in the smart home and components range are a sensible place to start.
Here is the practical path from blocks to text.
from microbit import *. That single line gives you access to the buttons, the LED display, the accelerometer, and the rest of the board. Type it at the top before anything else.while True: loop, an if button_a.is_pressed(): check, and a display.show(Image.HAPPY) line. Rebuilding something familiar teaches the syntax faster than starting cold.if must be indented consistently. This is the single most common early stumble, so watch it closely.The good news is that your thinking carries over completely. Loops, conditions, variables, and the logic of "when this happens, do that" are identical concepts. What changes is the spelling. show LEDs becomes display.show(). on button A pressed becomes if button_a.is_pressed():. You are translating ideas you already understand into a new grammar, not learning programming from zero.
The hardware concepts also stay the same. The accelerometer, the pins, the radio, and the buttons all exist in MicroPython, just accessed through Python objects instead of blocks. Keeping a spare board and a few sensors from the accessories best sellers means you can experiment without fear of bricking your only device mid-lesson.
No. MakeCode's Python is a different language to MicroPython, so there is no clean automatic conversion. The recommended path is to open python.microbit.org and rebuild your project in real MicroPython, which also reinforces the new syntax.
The official micro:bit Python Editor at python.microbit.org. It runs true MicroPython, has a simulator and built-in code snippets, and is the supported environment for learning text-based micro:bit programming.
No. The Python Editor runs in a web browser. You connect the micro:bit by USB and send code directly, or download the .hex file and drag it onto the board like a USB drive.
In text Python, indentation defines which lines belong inside a loop or condition. Blocks handled that for you; text does not. Make sure every line inside a while, if, or function is indented the same amount.
It is a step up because you type the structure yourself, but the underlying ideas are identical. Start by rebuilding simple block projects in text and the syntax becomes familiar within a few sessions.
Moving to text coding opens up far more of what the micro:bit can do. Pick up a micro:bit kit and accessories at Evetech and start writing real MicroPython at python.microbit.org.
No. MakeCode's Python is a different language to MicroPython, so there is no clean automatic conversion. The recommended path is to open python.microbit.org and rebuild your project in real MicroPython, which also reinforces the new syntax.
The official micro:bit Python Editor at python.microbit.org. It runs true MicroPython, has a simulator and built-in code snippets, and is the supported environment for learning text-based micro:bit programming.
No. The Python Editor runs in a web browser. You connect the micro:bit by USB and send code directly, or download the .hex file and drag it onto the board like a USB drive.
In text Python, indentation defines which lines belong inside a loop or condition. Blocks handled that for you; text does not. Make sure every line inside a `while`, `if`, or function is indented the same amount.
It is a step up because you type the structure yourself, but the underlying ideas are identical. Start by rebuilding simple block projects in text and the syntax becomes familiar within a few sessions.