您的位置:主页 > 闻财起舞 >

Micro:bit基金会是壹个全球性的匪赚钱布匹局,让

时间:2019-10-02 02:03来源:原创 点击:

????BBC micro:bit 25??LED??????????????

???????? ??????????????????????????? LED ; ???? ?????λ??? ????λ???0??1??2??3??4???? ??micro:bit?????????????????????????????????? ?? ?????????

??????????5 X 5 ???????????x??y????????U

????The x, y coordinates for the LED in the centre of the grid are . Starting from count over 2 columns and then down 2 rows.

????Since the row and column numbers start at 0, an easy way to figure out the x, y coordinates is to subtract 1 from the row and column number (when counting from 1). In other words, to specify the LED in the 4th column 5th row, subtract 1 from each number to get coordinates .

????Use + ???? and ?????? to turn an LED on or off.

????Use the point function to find out if a LED is on or off.

????Instead of turning individual LEDs on or off, as above, you can display an image directly to the screen or show text/numbers on screen using the show number/show string function.

????See the images section of the documentation to learn more about programming the LEDs in Python for micro:bit.