12/18/2023 0 Comments Make doodlejump in swiftThe steps to get a debug console, also more commonly known as a REPL - Read Evaluate Print Loop - are very easy.įirst you need to set up a USB serial connection to the Micro:bit. Having a console where you can see error messages and see debug output is essential for an efficient and stress free programming experience. I would even go so far as to say that MicroPython isn't fit for purpose without it, if that purpose is to teach children to program.Įven with it MicroPython is the most unfriendly of the supplied programming languages because it does no syntax checking before you go to the trouble of downloading and running the program. Without it you are going to have to do a lot more work to debug your programs. You don't have to do this step but if you are going to be developing using MicroPython then I strongly advise it. The solution is to set up a debug console. You might be better than me at reading the LED, but it can be difficult to spot the line number go by and the rest of the message is often cryptic on first reading, to say the least. This means you can download a program and the first thing you know about even a really big error is that you see an error message scrolling across the LED display. The MicroPython editor is very easy to use but there are some difficulties that we can do something about. When you enter a program there is no online syntax checking. When you connect the Micro:bit to your desktop computer it installs itself as a USB drive - this is the only communication the PC needs with the Micro:bit as any program copied there is immediately loaded and run. Make your way to the Micro:bit website, click on Create Code, choose the MicroPython editor and start coding.Īll you do is enter the program into the editor, click the download icon and then copy the download onto the Micro:bit usb drive. In the rest of this article it is assumed that you have a Micro:bit and know a little Python but not that much. Not in all its many-colored glory but we can reproduce some of the original game play - and the temptation of re-implementing a game from the BBC Micro days on the BBC Micro:bit days was too good to miss! If you didn't make it the commando would slide down with a deflated noise.Ī 5x5 LED display is just enough to implement this game. If you reached the top of the wall before that time out then at the next level there was a higher wall. ![]() The faster, the higher the commando climbed. After that they could make the commando scramble up the wall by pressing a key as fast as they could. The initial jump height was determined by the player's reaction time. It presented the player with a wall that the commando had to climb. It was, by design, a very simple game intended to teach BBC Basic programming. In this article we implement the game in MicroPython development, but if you want to use the Microsoft Blocks editor see Micro:bit Commando Jump In The Microsoft Block Editor.īack in the days of the BBC Micro I was involved the development of a game called Commando Jump that was included in the book 21 Games for the BBC Micro. Games have always been a great way to get into programming so why should the micro:bit be any different. ![]() In this project we resurrect a classic BBC Micro game on the BBC micro:bit. ![]() What sort of game could you possibly program on that! The Micro:bit is quite a capable computer but it does have one limitation - it only has a 5x5 LED matrix display.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |