BBC Micro: bit - children's learning microcomputer: I / O capabilities

Hi geektimes. The first part briefly talked about the BBC Micro: bit children's educational microcomputer.







As mentioned earlier, the BBC Micro: bit boards are provided to all British students for free, they are also used in computer science lessons. It is obvious that many tasks and algorithms are much more interesting to try "live", and the theory is much better absorbed when supported by practice. Therefore, it is interesting to see what features BBC Micro: bit provides and what can be done on it.



Let's start with I / O capabilities.



Let me remind you that there is no need to install any software to use the board, everything is done online (for paranoids, the offline editor also exists). Through an ordinary browser, both the editor and the fully-fledged simulator are available (by the way, it is convenient to test the program in it, even without a board available). BBC Micro: bit can be programmed in a visual editor, with the help of Javascript or in Python (using this opportunity, say hello to the Ministry of Education and informatics teachers who still use Turbo Pascal).



Input Output



Recall what the board looks like in terms of hardware.







On the board there are 2 buttons, an accelerometer, a compass and a pin line. For output, an LED screen is used in the form of a matrix of 5x5 LEDs. Not very much, however, the developers managed to provide quite diverse ways of data input and output.



You can use all methods at the same time:







As you can see, for output to the user, functions such as are available:



- line output

- number output

- output of graphic icons (there is also the possibility of individual activation / deactivation of LEDs, which can be used to create mini-games, for example, “snakes”).



Input options are also quite varied for a board of this size:



- hardware buttons A or B, also their simultaneous pressing

- a very unusual finger touch mode of one of the pins 1, 2 or 3, the second hand should touch the pin GND

- Accelerometer functions: shaking, turning the board with the screen up or down, and even “free fall”.



In addition, you can use a compass or an illumination detector .



Compass



You can programmatically get the values ​​of the compass, then use them in the code, for example:







Alas, unlike the simulator, on a real board the accuracy of the compass was not so high, however, maybe I somehow incorrectly did its calibration. In real life, the compass showed anything except heading north.



Accelerometer



The user has access to all 3 axes of the accelerometer. For example, we can give a simple program that allows tilting the board to move a point on the screen:





(For a very "dummies" on youtube, I laid out a detailed analysis of this example)



temperature sensor



It is possible to programmatically obtain temperature values.







Serial port



And finally, for fans of Arduino , it is possible to output data to the Serial port. This greatly expands the capabilities of the device, allowing for example to connect Micro: bit to a computer or Raspberry Pi and save the received data to the log. It is also convenient to output debugging data to the port.



To use the serial port, you first need to install the driver from developer.mbed.org , then data is received as usual by any program.



This program outputs data from the accelerometer to the Serial-port:







Data can be saved on a computer as csv, then output as a graph:







Light sensor



And finally, the light sensor, its values ​​are also easy to display in the serial port:







Conclusion



In general, it can be noted that for its price of 15 pounds (and this is 4 trips on the subway in London), the board was very good. It is designed for children from the age of 11, and allows you to learn the basics of computer science and algorithms in practice, which of course is much more interesting than abstract theoretical problems. It is also possible to study the interaction of the computer with the sensors and the "outside world", without delving into the subtleties of the circuitry: a set of sensors pre-installed on the board is quite good for such a price.



Not all Micro: bit features were considered here. For example, the board can still control the servo, or output the sound to one of the pins. Micro: bit also has a radio module that allows you to make even multiplayer games and programs. For those who want to use additional devices, additional kits began to appear on the market, for example, the Grove Inventor Kit.



Of course, the board is not ideal, for example, there is not enough slot for SD-cards or a full-fledged emulator when using Python. But even in this form, as now, BBC Micro: bit may well make computer science lessons much more interactive and interesting. At least for British schoolchildren.



As suggested in the comments, a similar project is also being tested in Germany, using the self-developed board Calliope mini . The experiment is conducted in the federal state of Saarland, the students get acquainted with the microcomputer from the third grade .



All Articles