BBC Micro:Bit

66252304_2329475737122168_1827825187962224640_oThe BBC Micro: Bit is, to say the least, an outstanding product.  Designed to give the youth of Great Britain a headstart in the world of computing, the device made its way outside of the UK and has been available in the US for a time now.  I decided to give it a spin and, boy, talked about impressed.  It’s very small, very simple and very po67347291_2344305822305826_4275078865820319744_owerful. For under twenty US dollars, you get a micro that contains two buttons, a 5×5 LED matrix, ample RAM and EPROM, a simple but effective bus, battery power as an option via a built in connector, accelerometer, Bluetooth and more.  This thing is super simple to program as well (which was the goal.)  You can use Microsoft’s MakeCode IDE, the MakeCode website, A micro Python development IDE (via the WEB) and even Arduino IDE.  MakeCode is, perhaps, the easiest to use. It appears to work and look like the Scratch environment where you, literally, drag and drop controls to connect them together and form your program. You can get surprisingly sophisticated with this.  Each Micro: Bit is capable of communicating with other Micro: Bits, which allows for multiuser games or other uses.

66336575_2329475810455494_7193210424181915648_o

There is also a fair amount of third party support for Micro: Bit.  Add on LCD screens (which I have purchased one), controllers, cases, etc. I am in the process of reviewing a few and will write about them later. 

I am using these (I bought three, one for each of my younger children and one for myself—naturally.)  Both of my young ones seem to have taken to the device, with my youngest, who is six, being the most fascinated with the device.66520223_2334648659938209_3996346474836262912_o

The pricing for the device, under twenty US dollars, is perfect and the accessories are inexpensive as well.  Getting into hardware and software is easier and cheaper than ever.  This is a great way to enter the field.

Stay tuned for code, more photos and other tidbits on this terrific little device.

Advertisements

Using Half-Byte Embedded Tiny Basic to Teach

HBPortableLabIt is 2017 and we have a slew of low cost or free tools available that teach anyone how to program a computer.  Just for Windows, we have something called Small Basic, from Microsoft. It is free and has a bunch of material you can use to teach anyone, especially children, how to code. There is also Python, Minecraft and a host of other, modern tools.

So, why use something as crude as Tiny Basic? One that requires a terminal? Well, there are a few reasons you may want to do this.

Cost, for one. 

It is free. It runs on Arduino and Arduino clones.  You can use it to also teach basic electronics.

And, that is what I am doing…using it to teach not only programming, but also how computers work.  It is really more for the latter as Small Basic cannot manipulate sensors and other hardware like Tiny Basic can.  Since Tiny Basic includes instructions for reading temperature sensors and a real time clock, it is perfect for teaching things like turning on something on if the temperature gets above a given number or it if is 5 o’clock, turn off something.

I recently started doing this with my step son.  We used Embedded Tiny Basic on my ‘portable’ lab, which contains an Arduino UNO clone, a 2 x 16 LCD, breadboard and voltmeter.  We first made one green LED blink, then added a second, red LED blink.  I used Tiny Basic to explain how to talk to the LED’s and used the DELAY instruction to make the LED’s blink at a constant interval.  I also took the opportunity to teach him binary.  We had discussed it previously, but I don’t think he really got it. Until now.  Using the DWRITE statement, which takes two parameters…pin number and a zero for off or 1 for on.  Having him use that code got him to understand the concept.  Small steps.

His mind is wandering now…’I can build a robot…a game…something to tell me when Xander is coming down the hall…’ Xander is his four year old brother. 

There are those of you out there who are thinking that this is a terrible idea, using Tiny Basic, that is.  Well, no, not really.  He is getting real instruction with a more object oriented and modern language while using Tiny Basic to learn the nitty gritty of the hardware.  You do not need a modern, object oriented language to blink an LED. 

I will post future updates on our progress as well as sample code.  Below is the code we used to blink the LED’s.

100 PRINT “INTERVAL”;: INPUT I
110 FOR X=1 TO 50
120 DWRITE 3, 1
130 DELAY I
140 DWRITE 3,0
150 DELAY I
160 NEXT X

(For single LED-it was on digital pin 3)