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.

110 FOR X=1 TO 50
120 DWRITE 3, 1
140 DWRITE 3,0
160 NEXT X

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

2 thoughts on “Using Half-Byte Embedded Tiny Basic to Teach

  1. This is a great idea. I am working on some projects at my local makerspace and we have a bunch of Arduino clones (the ones with the CH341 chip) for a buck or two a piece that are just laying around. I think this might be a good example of what can be done with a basic computer and help beginners understand some basic programming concepts. I like the fact that they can directly interact with the pins. I want to try to get the HB Tiny Basic up and running but I am having problems with the libraries, but I plan on installing Arduino IDE 1.6.X so that should solve most of the issues. Is version 3 the most recent or is there a newer version I missed?

  2. I had no success with tiny basic and tvout the ps2 keyboard never worked no matter what versions I used. The embedded version no problem it seems ok it’s a bit faster than I expected not that speed is an issue I love machines where you can write the rules on the back of an envelope. I’m smart enough to know I’m not very bright, however (getting ready to make an ass if myself) I can’t find a schematic for which pins of are used for the led matrix ,rtc,dht ,lcd,and looking at the software gives clues but is there a diagram somewhere? Or have I missed something? I have never managed to establish a time line for this project Google spits out the blog pages at random regardless of chronological order no matter what . I had a go at making a tiny basic using pic basic my idea was to store basic tokens in serial ram and with the associated data poked into a working register the the token the used for a on N goto jump list it then the result passed back like an old fashioned user call it showed promise I was not going for speed but I could not get around problems with line editing. It takes me ages to code life is short I gave it up. Keep up the good work!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s