The ATTiny 85 Handheld Game – New Games

The ATTiny 85 Handheld Game – New Games

Half-Byte ATTiny-85 Hand Held Game, based on the WebBoggles design

There are several new games contributed to the hand held game devised by Webboggles (and adapted by me for the Half-Byte Handheld Game.) Check them out by going here:

Among the new games are:

  • PONG
  • and the original games in bundles of two

There are variations of the hardware, for example, the PONG game really needs a potentiometer or paddle control. Schematics are included.

The games are free for personal use.  

Please show WebBoggles your appreciation.

Tetris Schematic:

Tetris Multi-Button

Frogger Schematics:

Frogger Attiny Schematic

Running Tiny Basic on the Micro: Bit

I was looking for some things to use in teaching my kids some programming with the BBC Micro: Bit and came across Tiny Basic on the Micro: Bit.  The implementation of Tiny Basic is a cross between Arduino Tiny Basic and Palo Alto Tiny Basic.  It’s very comprehensive and includes things like LED control, sensor reading, and serial communication via USB.  This is a great way to introduce kids and adults alike to the wonderful world of programming, hardware and the Micro: Bit. 

Full source is available, unfortunately, the GITHUB is in Japanese.  HOWEVER, you can use Google or Bing translate to translate the page for you. 

I have taken the liberty of bringing some of the information to you.  I had a bit of an issue making it work, so, here’s what I found so you don’t have to worry about it.


You can, of course, download the full source and associated libraries and compile it yourself and then import into the Micro: Bit.


All you really need is the compiled HEX file.  To get that…

  1. Download

  2. Connect the  micro:bit.
    You should see the Micro:bit drive “MicroBIT”
    Unzip the download file
    From the bin folder, copy the file  ttbasic_microbit.ino.hex to the micro:bit (you can drag and drop it into the Micro: Bit folder.

  3. When the program write is finished, connect the serial with terminal software (TeraTerm, for example) etc.

  4. Set up your terminal software as follows:

    Terminal communication conditions Communication speed 115200bbs, parity none, stop bit 1, flow control: No; set the transmission delay to 1 ms/character.

Once you have downloaded the hex file to the micro: bit and setting up and connecting to your favorite terminal app, you should reset the micro: bit and see something like:

tinybasicformicrobitThe dialect of Tiny Basic is similar to Half-Byte Tiny Basic, but, it has far more capability.  With more memory to work with, no graphics and Micro: Bit hardware, there are a bunch of things you can do.

The following is copied directly from the web site.

Available keys

  • Cursor Move Cursor Key
  • Delete, CTRL-X: Delete characters at cursor position
  • BackSpace: Delete characters before cursor and move forward
  • PageUP, PageDown, ctrl-r: Refresh the screen
  • HOME, END: Move cursor to left or right edge in row
  • INS: Toggle toggle switching for insert sand
  • Enter: Line entry confirmed
  • Press ESC twice, ctrl-c: suspend execution program
  • CTRL-L, F1: Clear Screen
  • CTRL-R, F5: Screen Refresh

Pin-assigning and pin-specifying

  • Pin: Specified by PN0 through PN32, or 0 through 32
  • Pin mode specification command :GPIO pin , OUTPUT | INPUT_PU INPUT_PD INPUT_FL”
  • Digital Output:OUT Pin, HIGH| LOW|0|1
  • Digital input: variable =IN(pin)
  • Analog input: variable =ANA(pin)

Sample Program

Colored text on the screen

10 FOR I=0 TO 10
20 FOR J=0 TO 10
30 COLOR RND(8): ? "*";
35 WAIT 100
50 ?

Flashing LEDs on board

20 OUT 3,LOW
35 "@loop"
40 OUT 26,HIGH
50 WAIT 300
60 OUT 26,LOW
70 WAIT 300
80 GOTO "@loop"

Analog value display

10 CLS
20 A=ANA(PN0)
30 LOCATE 5,5:?A;"    "
40 GOTO 20
Button input determination
10 CLS
20 IF !IN(BTNA) ?"Button A"
30 IF !IN(BTNB) ?"Button B"
40 WAIT 200
50 GOTO 20
LED Matrix Dot Display
10 CLS 1
20 D=1
30 FOR Y=0 TO 4
40 FOR X=0 TO 4
60 WAIT 100
90 IF D D=0 ELSE D=1
100 GOTO 30
LED Matrix Message Display
10 CLS 1
20 MSG LEFT,200,"Hello"
30 FOR I=O TO 30
40 MSG DOWN,50,I/10
50 WAIT 50
60 MSG LEFT,100,I%10
80 WAIT 500
90 GOTO 20
Assign ed.m. character A to display
10 POKE FNT+ASC("A")*5+0,`00000000
20 POKE FNT+ASC("A")*5+1,`01010000
30 POKE FNT+ASC("A")*5+2,`00000000
40 POKE FNT+ASC("A")*5+3,`10001000
50 POKE FNT+ASC("A")*5+4,`01110000
60 MSG TOP,0,"A"
10 SETFONT ASC("A"),$00,$50,$00,$88,$70
Neopixel Blue Trajectory Rotation
10 'Neopixel(1)
20 NPBEGIN 0,16
40 FOR I=0 TO 7
50 NPRGB I,0,0,(2<<I)-1
80 WAIT 50
90 GOTO 70
4x4Keypad input key determination (simple chattering measures available)
10 'Keypad 4x4
20 G0=-1
30 @(10)=1013,920,840,780,670,630,590,560,502,477,455,435,400,320,267,228
40 G0=G
50 G=GRADE(ANA(1),10,16)
60 IF G<>G0 WAIT 1 GOTO 40
70 IF G>=0 ?"KEY=[";G+1;"]"
80 GOTO 40
Time display (display the time when you press A button)
1 'トケイ
20 SETDATE 2018,1,16,12,0,0
30 IF !IN(BTNA) GOSUB "@ShowTime"
40 WAIT 200
50 GOTO 30
60 "@ShowTime"
80 MSG LEFT,80,#-2,T1;":";T2;":";T3;" "
(new!) Browsing Misaki Font Data
1 '美咲フォントの利用
10 S="あ"
30 FOR Y=0 TO 7
40 D=PEEK(A+Y)
50 FOR X=0 TO 7
60 IF D&($80>>X) ?"■"; ELSE ?"  ";
80 ?
(new!) Character display with NeoPixcel (8×8 matrix type)
10 'NeoPixelで文字表示
20 SETFONT 0,$50,$A8,$88,$88,$70
30 MSG TOP,0,CHR$(0)
40 NPBEGIN 12,64
60 S="こんにちは☆さい玉":C0=RGB8(0,2,3)
90 FOR Y=0 TO 7
100 D=PEEK(A+Y)
110 FOR X=0 TO 7
120 IF D&($80>>X) C=C0 ELSE C=0
140 NEXT X
150 NEXT Y
160 NPPUT 0,MEM,64,1
170 WAIT 400
180 NEXT I
190 GOTO 70
(new!) LED Matrix Font Creation Tool (Created by Mr. Goeda)
10 CLS:CLS 1:CLV:LET @(20)=79,42
20 FOR I=0 TO 4:FOR J=0 TO 4
40 K=INKEY()
50 X=X+(K=KRIGHT)*(X<4)-(K=KLEFT)*(X>0)
60 Y=Y+(K=KDOWN)*(Y<4)-(K=KUP)*(Y>0)
80 IF K=32:IF C=@(20) P=@(21) ELSE IF C=@(21) P=@(20)
90 IF K<>32 GOTO 40
100 ?CHR$(P);
110 FOR I=0 TO 4:D=0
120 FOR J=0 TO 4:C=VPEEK(J,I)
130 IF C=@(21) D=D+(1<<(7-J))
140 NEXT J:@(I)=D
150 NEXT I
160 GOSUB 500:GOTO 40
500 LOCATE 0,10:?"SETFONT ASC(";CHR$(34,90,34,41);
510 FOR I=0 TO 4:?",$";HEX$(@(I),2);:NEXT I
520 SETFONT ASC("Z"),@(0),@(1),@(2),@(3),@(4)
530 MSG TOP,0,"Z"

From then on is the original document

TOYOSHIKI Tiny BASIC for Arduino

The code tested in Arduino Uno R3. Use UART terminal, or temporarily use Arduino IDE serial monitor.

Operation example

> list 10 FOR I=2 TO -2 STEP -1; GOSUB 100; NEXT I 20 STOP 100 REM Subroutine 110 PRINT ABS(I); RETURN

OK >run 2 1 0 1 2

OK >

The grammar is the same as PALO ALTO TinyBASIC by Li-Chen Wang Except 3 point to show below.

(1) The contracted form of the description is invalid.

(2) Force abort key PALO ALTO TinyBASIC -> [Ctrl]+[C] TOYOSHIKI TinyBASIC -> [ESC] NOTE: Probably, there is no input means in serial monitor.

(3) Other some beyond my expectations.

(C)2012 Tetsuya Suzuki GNU General Public License

RCA Voyager III Tablet Mini Review

MVIMG_20190727_221225Tablets seem to be more of a commodity product than the revolutionary product they were a decade ago.  Indeed, it seems that everyone has a branded tablet and the company that owns the RCA name now also has a tablet: The RCA Voyager III. This tablet is powered by a quad core processor with a 1024 by 600 pixel display (IPS…boo) and runs Android 8.1. Oh, it’s $49.95 from Wal-Mart.  As of this writing, it was being sold as an impulse item in the ‘back to school’ section near the front of the store.  It’s bargain bin price reflects it bargain bin quality and performance.

The device has 16gb for storage, but is upgradable via MicroSD.  When installed, the SD card can either be formatted and made ‘internal’IMG_20190727_231620 to the device, which means no other device can read its contents OR you can use it as a separate storage for your own media.  That’s how I am using the 2 gb card I put in it.

Even though it is a fifty dollar tablet, it does have some things to like.  For example, out of the box setup was quick and easy.  As it runs Android 8.1 AND has the full Google suite, it has Google Play and, thus, a ton of software. As with my phones, the first thing I did was install Launcher 10 to add a more sensible shell in the guise of Windows Mobile 10.  Gotta have my tiles.

The tablet’s screen is responsive, touch wise.  Any lags are due to the slowness of the processor, I think.

Now, speaking of the screen, this leads me into what is not good about the device.

  • The screen is, simply put, awful.  It is fuzzy, low res and muted.
  • Performance is also mediocre.  Tapping an icon to start an app results in a few second delay followed by the app actually staring, if it can.
  • The feel of the device is, well, cheap.  It is all plastic. At least Kindles have a more ‘premium’ feel, well, compared to this, anyway.
  • The cameras are terrible.
  • Sound is tinny as hell.
  • Did I mention the cameras?
  • Battery life seems a tad lower than the advertised time of 6 hours.  It’s probably more like 4 to 5 with real world use.
  • And, perhaps, the worst thing of all: a proprietary power adapter. RCA eschewed the USB charging scheme for a small mini plug, like you would have found 15 years ago.  UGH.


Now, in summary, don’t get me wrong: the tablet is not a great product on it’s own: you must keep in mind that it is cheap and, as such, does not make use of new tech or high quality parts.  BUT, keeping that cheapness in mind, it’s not a bad buy.  If you are out and about and need something a bit bigger than your phone, and you do not care about quality, this tablet won’t let you down.  It is adequate for light web surfing, listening to a podcast, simple games and checking that credit card balance. An Amazon Fire 7 may be a better buy, for the same price.  On second thought, the Fire 7 probably should be your first choice.  IF you cannot pick up a Fire 7 AND you have an immediate need for a crappy tablet, this thing is probably a good bet.  Perhaps.

UPDATE! – March, 2020

I am surprised and please to share that RCA has sent several over the air updates to firmware AND Android.  I am not yet sure about the updates, but, the tablet does seem a bit more responsive and stable.  Stay tuned, I will update with more.

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.


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.

Sony PlayStation Retro Console…Thoughts

So, Sony decided to enter the retro ‘mini’ console craze that has seen the likes of Atari, Intellivision, Colecovision, Commodore, Sega and Nintendo become fun again.  They released a mini console replica of the original Playstation console from the nineties.  Now, I am not going to go into detail over what games came bundled or how much fun they are (a LOT) but, instead, I want to comment on the design, ease of use and a few nits over what is, otherwise, a decent product. Purists will bitch about it and the gaming press has villified Sony over the console, but, I am not (!) going to do that.


First, let me get my complaints about the console out of the way. 

Number 1: No power supply. Yes, this thing ships with ONLY a USB cable for power. Sony assumes you will plug it into your modern television’s USB port.  However, that did not work for me. I am not sure why, the set I use it on has a powered USB port, but, the console refused to get its power from there.  A normal USB wall wort worked fine.

Number 2: The unit took forever (OK, a few added seconds) to power up. When I plugged it into the wall wort, nothing appeared to happen. But, after a few seconds, the LED lit up an amber color. Pressing the power button turned the LED green and the console came to life.  It works fine.  So, I tried the USB port on the set again…nada, zero, zilch.  Didn’t get power from there.  The old Roku, though, did.  Odd.

Number 3: The interface is terrible.  The circular carousel isn’t the issue, its the quality of the presentation.  Yes, I get that it emulates something from the 90s, but, on a larger screen, it’s difficult to read.  The HDMI output is greatly appreciated, but, the presentation should match. The games, don’t necessarily have to, but everything else should. And, this leads to Number 4 and 5…

Number 4:  Why HDMI only?  The set I was going to put it on has bad HDMI inputs (yes, all three ports are dead) so, I wanted to use COMPOSITE, but, no, no composite output.

Number 5: Sony should release more games (as some other company has) for the console.  The 20 games included are fun, but, it would be nice to have more.

Number 6:  Last, the size of the console is a problem for me.  While it is cute, its a bit small (the controllers are, however, full size) and very light…which is the issue.  The attached controllers (both are USB and I am grateful for that) and if you move excitedly, you end up pulling the console with you.  A minor thing, but, annoying nonetheless.


There is a lot to like about the console.  It is unobtrusive (to a fault) and easy to set up. The controllers are familiar, so there is zero learning curve if you have played Playstation at all.  The selection of games is nice and, Tekken 3, is the bomb. The games, to me, are faithful enough and seeing the Sony logo is really cool (even though I am not much of a Sony guy) as it reminds me of the fun I had on my PS ONE.

Even with the paltry 20 games that are included, they are good games…but…if you want more from Sony, that is a no go, HOWEVER…if you search on Amazon, you can find a few products that add more games.  I ordered one

such device (a USB stick and a four port USB hub) that added 51 fighting gams (most of the Street Fight type) and an additional product that adds another 101 games.  So, for under 80 dollars, you can relive the early to mid nineties PlayStation experience. 

Even with my six ‘nits’ against the device, it was well worth the forty bucks I paid on Prime Day (it doesn’t cost much more if you shop around) and it even excited my two younger kids, both of which grew up on XBox 360 and Nintendo Wii and Switch.  Their initial thoughts…”wow, those are OLD” But, they loved the games. And, really, that’s all that should matter.

The Mini PlayStation is great deal.  Contrary to what has been written about it, it comes packed with nostalgia, good games and a nifty little case that is a tad on the small side.  You and your kids will love it.

Upgrading your car: replacing that old CD Player with a new touchscreen system with Bluetooth and more

AltimaHybridI have a 2007 Nissan Altima Hybrid. It is nothing fancy, and isn’t in the best shape. Oh, the body is in good shape, it needs a little TLC, like paint and other cosmetic fixes.  Creature comfort wise, though, it came with a workable CD/Radio, cruise, power seats and…that’s about it.  Well, I also have a 2007 Infiniti with a lot of bells and whistles.  So, I wanted some of that in my Nissan.  I set about to see what I could do.  I found out that there are A LOT of possibilities.  And, they don’t cost an arm and a leg.  So, I swam through a sea of similar head end units and found one for under $40 (US).  The unit has MP3 audio, SD and USB ports, plays a plethora of video formats, FM Radio, backup camera support, 7 inch, HD touch screen, Bluetooth and supports video in and out.  Wow. For forty bucks.  Well, in order to install this, you need an installation kit. So…I got one of them AND the correct wiring harness for the 2007 Altima with digital enviro controls.  The installation kit was twenty five dollars (US) and fits the car perfectly. 

The items arrived, days apart, of course.  I tested the headend and it appeared to be fully functional so I preassembled the installation kit and mounted the head in the kit.  I then soldered the harnesses so they would be ready.  20181023_201024

Installation was relatively easy…except, the head was about 5 mm too wide and, maybe one mm too high for the kit.  I was able to make it work by trimming the bezel and, since the kit is plastic, was able to slightly bend one bracket just enough to where the mounting holes lined up. The bezel that goes on the front had to be trimmed a bit for the knob.

received_328936107898619Installing the whole thing in the car was even easier.  Pop off the vent cover, pull off the bottom cover (just under the enviro controls and remove the two screws at the top and two at the bottom and pull the unit out.  You then have to remove the environ controls. There is one Torx screw on each side. Take them out, then bend the tabs up that hold it in the cage and pull it out. It snaps into the new cage. Screw the Torx screws back in and then connect all of the harnesses and the antenna.  Put the whole unit back in, screw in the four screws and then put the vent cover back.  Start the car and setup the unit.  Simple. It took me about thirty minutes.


Setup is fairly easy: tap the setup icon, set the language, FM Frequency, Video standard (NTSC or PAL) and set received_529731680832352the Boot logo if you want (enter 1983 on the keypad and look for your car manufacturer.) You can set the time by tapping on the clock and setting the date and time.  Its a bit cumbersome, but easy to do.

Pairing your phone is simple.  On your phone, look for GTB-KIT or something like CARKIT. You can import your phone book and phone log once paired.  It is the easiest pairing in a Bluetooth device I have seen.

The FM radio has three ‘banks’ of presets. You can let the device do it for you by pressing the PS button on the FM screen. You can then add or delete all you want.  NOTE: there is no AM radio on most of these cheap devices. Mine is the MP5-7023B and looks to be a clone of nearly all of the cheap head ends out there. The user interface, while looking OK, is not that easy to understand. Discoverability is not, apparently, a concern for the developers.

20181023_202611The MP3 player, photo viewer and movie player all require a USB stick or SD card, even though that is labelled ‘TF Card’. You need to create three folders: Music, Video and Photos.  Photos ONLY works with JPG files.  PNG and BMP(!) do not appear to work.  Video works with pretty much every codec and container out there. Music plays MP3, OGG, WAV and a few others.  Oh yeah, FLV video is supported.

I didn’t want the default non-Logo to display when the unit starts, I wanted the Nissan logo. Fortunately, in setup, there is a logo feature that allows you to pick one of couple of dozen or so manufacturer logos. Many are European or Asian and unfamiliar to me.  The Nissan logo was there, so I picked it.  To get to the page, go into setup, tap the Logo button and enter 1983. The page will display. Simply select the logo you want by tapping it.  Hit the Home button to save. Boom, done.

What I don’t like

The user interface is really wonky.  It is pleasant enough, with a kind of Windows 8 look for the home screen.  Lots of blue is used.  This is all fine, but, it is REALLY sluggish.  The touch screen is not very sensitive either.  In bright light, it washed out, big time.  The knob serves many purposes, but is mainly confusing. Not only can you turn it, like a real knob, but you can also push it in. It is context aware, but inconsistent.

The equalizer function works for all music playback, but is only available on screen if you are in the FM Radio app. 20181023_211917 Otherwise, you must press the knob, several times, to get to the very small icon for the EQ, then you turn the knob for one of four or so presets.  You cannot create your own sound, though.

The remote woks great, but, the buttons are difficult to press and you must be in line of sight with the IR receiver. And, why the remote? I would rather have had a steering wheel control.  However, the remote does make navigating the touch screen much easier.

Bluetooth works fine, but the music playback from your phone is not complete. All you get is Previous, Next, 20181023_201049Pause and Play. You get no info about what is playing or the album art. 

What I like

For the price, everything. This thing was forty bucks.  Yes, it is far from perfect and, likely, won’t last.  I am OK with that, as long as I can get six months or more.  I plan to get a nicer one with DVD and GPS, but, this will work in the interim.  Speaking of GPS, I am working on a DIY GPS that will utilize a Raspberry Pi and GPS module I got from Radio Shack, years ago, for my Arduino stuff. The MP5 has an external video input that I will use for the GPS.  I also have a backup camera I am going to install in the car. The unit supports this as well.

If you have an older vehicle that could use an upgrade like this, you can certainly do it on the cheap.  The thing to keep in mind, though, is the installation kit. More common cars, like the Altima, will probably have the kits readily available. Otherwise, you might have to get creative.   All in all, it is a worthy upgrade and didn’t break the bank or take hours to do.


Building your own programmable clock

20180120_204454Wow, it’s been quite a while since the last posting.  I thought we would start the year off with a cool project, a reboot of my Half-Byte Clock, featuring Embedded Tiny Basic. This time, I use an Arduino Nano and a nice canvas/wooden ‘case’ to house it all.

Instead of using the somewhat large Half-Byte Console board, I use the Nano so it fit inside the wooden frame. The frame is roughly one inch thick, just big enough for the Nano and all of the components to fit. On this particular iteration, the light sensor and speaker are on the back of the frame and, because of poor planning, the temperature sensor sticks out of the side. I intend to remedy that, but that will be later.  I am too busy to worry about that right now.

The Components

For the project, you will need:Samsung 6980

    • Arduino Nano or similar 328 based microcontroller board
    • HC-06 Bluetooth module
    • DHT-11 Temperature sensor
    • Light Sensor (I used the OSEP LIGHT 01 module)
    • Two or Three 8×8 LED Matrix displays, assembled with controller
    • DS3231 RTC for Arduino (Real Time Clock)
    • Small speaker (I stole this out of a toy cell phone I purchased at Dollar Tree)
    • Case/Frame/Canvas

My total cost is about twenty five dollars. The most costly part was the canvas frame-$8.95 at Target. All other parts were sourced from Hobby Town or Amazon.


The clock features programmability via Half-Byte Embedded BasiSamsung 6945c, though you can use whatever code you like. This project, though, is aimed at a reprogrammable device that can display the time/date, temperature/humidity, output sound, use the ambient light to brighten or darken the display and be programmable over Bluetooth.  You have about 1k of RAM to store your Basic code and, once saved, will remain in memory, even if you unplug it. Upon power up, if there is something in memory, it will auto start after five seconds.

Wiring it Up

I was going to get all fancy and draw a diagram, but I think the pin connections will make more sense to more people, so that’s what I am going to do.  There are also photos you can look at.  As my hands aren’t as steady as they once were, my soldering leaves a lot to be desired.

DHT 11:

  • Data line to pin 2 of Nano
  • (+) to +5v on NanoSamsung 7010
  • (-) to GND on Nano



  • SCL to A5
  • SDA to A4
  • GND to GND
  • VCC to +5v


Light Sensor:

  • Pin S to A0 on NanoSamsung 7008
  • (+) to 3.3v on Nano
  • (-) To GND on Nano


LED Array:

  • data to pin D12    DIN pin of MAX7219 module
  • load to pin D10    CS pin of MAX7219 module
  • clk to pin D11       CLK pin of MAX7219 module



  • GND to GND
  • + to Pin D8 on NanoSamsung 7014


HC-06 Bluetooth:

  • VCC to +5v
  • GND to GND
  • RX to TX on Nano
  • TX to RX on Nano

Sample Embedded Basic Startup Apps:

Example 1:

100 PRINT "Welcome to Half-Byte LED Programmable Clock"
111 SCROLL " Clock."
112 IF HOUR(0)<12 SCROLL " Good Morning! "
114 IF HOUR(0)>11 IF HOUR(0)<18 SCROLL " Good Afternoon! "
116 IF HOUR(0)>17 IF HOUR(0)<=23 SCROLL "  Good Evening!  "
120 TIME
125 IF IN(0)<>-1 GOTO 600
130 SCROLL ".   Temp is "
140 TEMP
145 SCROLL "F  "
150 SCROLL "Humidity is "
170 SCROLL "  Hello!  "
180 IF IN(0)<>-1 GOTO 600
190 IF RND(99)>50 GOTO 110
200 SCROLL "       "
205 O=MINUTE(0)
210 W=15
220 H=7
230 X=RND(W)
240 Y=RND(H)
250 P=RND(W)
260 Q=RND(H)
265 IF IN(0)<>-1 GOTO 600
290 SET X,Y,0
300 SET 16+(X),Y,1
310 SET 16+(X),H-Y,1
320 SET 16+(W-X),Y,1
330 SET 16+(W-X),H-Y,1
340 IF IN(0)<>-1 GOTO 600
350 SET 16+(P),Q,0
360 SET 16+(P),H-Q,0
370 SET 16+(W-P),Q,0
380 SET 16+(W-P),H-Q,0
390 IF IN(0)<>-1 GOTO 600
400 K=MINUTE(0)
410 IF K-O>1 GOTO 110
590 GOTO 230

Example 1 will randomly display random dot pattern for about a minute. It also analyses the time and inserts ‘Morning’, ‘afternoon’ or ‘evening’ in the greeting.  If you are connected via USB or Bluetooth, you can interrupt the app by sending a character followed by the ENTER key.


200 SCROLL "        "
210 W=15
220 H=7
230 X=RND(W)
240 Y=RND(H)
250 P=RND(W)
260 Q=RND(H)
300 SET 16+(X),Y,1
310 SET 16+(X),H-Y,1
320 SET 16+(W-X),Y,1
330 SET 16+(W-X),H-Y,1
340 IF IN(0)<>-1 GOTO 600
350 SET 16+(P),Q,0
360 SET 16+(P),H-Q,0
370 SET 16+(W-P),Q,0
380 SET 16+(W-P),H-Q,0
390 IF IN(0)<>-1 GOTO 600
590 GOTO 230

Example 2 is the kaleidoscope from Example 1


100 SCROLL " Half-Byte Clock "
110 H=HOUR(0)
120 IF H<12 SCROLL " Good Morning! "
130 IF H>11 IF H<18 SCROLL " Good Afternoon! "
140 IF H>17 IF H<=23 SCROLL "  Good Evening!  "
150 TIME
160 IF IN(0)<>-1 GOTO 600
170 SCROLL " Temp is "
180 TEMP
190 SCROLL "F  "
200 SCROLL "Humidity is "
215 SCROLL "%         "
220 SET 20,2,1
230 SET 23,2,1
240 SET 20,4,1
250 SET 23,4,1
260 SET 21,5,1
270 SET 22,5,1
280 FOR X=1 to 5
300 SCROLL"  "
320 SCROLL"  "
530 IF IN(0)<>-1 GOTO 600
540 NEXT X
580 SCROLL "       "
590 GOTO 110

Example 3 displays the date and time as well as the humidity and temp. It also shows an animated smiley face.


100 SCROLL ” Half-Byte Clock ”
110 H=HOUR(0)
120 IF H>=0 IF H<12 SCROLL ” Good Morning! ”
130 IF H>11 IF H<18 SCROLL ” Good Afternoon! ”
140 IF H>17 IF H<=23 SCROLL” Good Evening! ”
150 TIME
155 IF H=17 IF MINUTE(0)>=0 IF MINUTE<=10 SCROLL ”  TIME FOR name TO COME HOME!”: TONE 8,3000,3000
160 IF IN(0)<>-1 GOTO 600
163 SCROLL ” ”
170 SCROLL “Temp is ”
175 TEMP
177 SCROLL “F  Humidity is ”
190 SCROLL “%”
200 SCROLL ”   ”
220 SET 20,2,1: SET 23,2,1
240 SET 20,4,1: SET 23,4,1
260 SET 21,5,1: SET 22,5,1
280 FOR X=1 TO 5
281 DELAY 40
300 SCROLL ”  ”
320 SCROLL ”  ”
530 IF IN(0)<>-1 GOTO 600
560 NEXT X
580 SCROLL ”       ”
590 GOTO 110
600 SCROLL “Interrupted!”

Example 4 is an example of an ‘alarm’. It evaluates the hour and minute and displays a custom message and then generates a tone. It also features the animated smiley.

Samsung 7025With some clever coding, you could write a game, create an interesting art display, message board and more.  There are unused pins on the Nano that you can also use to wire up something to control (like a pet watering device, lights, etc.)  All of the sensors are available in Basic or, if you choose to write your own custom code, use the pin outs above to read or write to them. You are only limited by your imagination. And, well, that tiny bit of RAM that these things have. C’mon, we went to moon on less.

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)

Hello, Samsung! My new journey with Android and Samsung-the Galaxy S8

Long time readers know I am a huge Windows Mobile 10 fan. I’ve had a Windows Phone/Mobile device for nearly four years and, prior to that, I had a Windows Mobile 5 device (a Motorola Q) waaaay back in 2008. Needless to say, I like Microsoft’s mobile operating systems. I had an Android phone in 2011 and then got an iPhone 4 when Sprint started carrying them. I NEVER liked that Android phone or the OS itself. I tended to crash and always told me I had filled up its storage even when there were gigabytes left on the SD card. It was slow too, much slower than my Palm Pre, Moto Q or that iPhone. Android was terrible. I said good bye and that was that.

Well, fast forward a few years and my beloved Windows Mobile 10 is, sadly, being left behind by its own creator. It never caught on with the public or with business, even with the hooks that business wanted. Sadly, it was an iOS and Android world.

Earlier this year, I spent a ton of money on an Alcatel Idol 4s with Windows Mobile 10. It is a fantastic phone, but developed an audio issue…I couldn’t hear phone calls unless on speaker phone. Apps I was using were being abandoned. I decided I needed to byte the bullet and move on. I can still use the phone, as a desktop device due to Continuum. But, what would replace such a capable phone and OS?

I read about Samsung’s Galaxy S7. Seems like a great device. But, then I discovered the S8 was out and was even more capable. So…I got one. Discounting the awful experience I had getting the phone (T-Mobile is far worse, customer service wise, than any other carrier…but, that is another story) the transition from Win Mo 10 to Android Nougat was much easier than I had thought it would be. The first thing I did was to Microsoft my phone. I installed the Arrow launcher, install Office, install Cortana, setup OneDrive, install Bing, set Bing as my default search engine, made sure the fluffy Google crap was off or uninstalled and installed SwiftKey. I tried some of the Win Mo 10 like launchers, but, ultimately, went to Arrow and its more Androidy look. The Win Mo 10 Launchers work well, but, I decided to make Arrow my default as it is developed and supported by MS and it works very well. No crashes.

So, how do I like the S8?
Well, it is superb. Fast, shiny, feels good and looks great. It is a tad more narrow than I would prefer, but that is a small thing and easily overlooked. Battery life is decent, but I think older Alcatel Fierce XL had better battery life. The curved, infinity screen is fine, but I am not sure I like the infinity screen: I inevitably do something I didn’t want to do. I do not think the curved sides are all that useful either. I’ve not seen anything that really utilizes them.

The fit and finish is superb. This phone feels like it is expensive and looks like it as well. Of course, it is expensive, around $600 to $800 (US). I really like the hardware. It is fantastic.

What about Android?
Well, I still hate Android, just not as much. I could grow to like it. In time. Maybe.

What’s good about Android?
This is a bit hard as there are certain things I really like, but I am not sure they are actually Android or Samsung developed. For instance, I like the softkey bar. home button, task button and back button are easily accessible and get out of the way when not needed. I am not sure if this is stock Android or Samsung. It’s nice, though. I also like skinning ability, but, again, I see more Samsung than Android. I know Android can do this, just not sure how much is one or the other. Android also seems to be more stable than I recall. The notification system is fantastic, but a pain in the rear as well. I think, overall, Android has come a very long way. BUT…it is still ANDROID and not Windows Mobile and therein lies most of my problems with it.

What’s bad about Android?
It is not Windows Mobile 10. Windows Mobile 10 had its live tiles, was so much easier to navigate and Edge has turned into an excellent mobile browser. Integrated Cortana worked well. Android is none of this. ‘OK, Google’ is a joke. The deafness of the launcher screens, the navigation is not very intuitive and the overall appearance of Android-while better than in the past-still has a long way to go. Material Design seems to be missing and Google Services do not seem to be any better than those from Microsoft or–gasp–Apple. Except for one big exception.

So, what’s the exception?
Google Photos is top notch. I really like this service. To steal a saying from Apple…it just works. It works when I do not ask it to do so. And, the results are very impressive. I thought Microsoft Photos, with the new video storyteller, was going to be best in class. I was wrong. Microsoft’s new Photo additions are great, but this service is even better. Try it. You. Will. LOVE IT.

So, I am out of the Windows Mobile ecosystem, probably for good. I don’t know how long I will be an Android user, but, if things continue the way they are, I don’t see myself going anywhere else for a very long time.

Microsoft’s deception: the Photo’s app in the post-creators release

Frustration.  That’s the word to describe what it can be like to be a Windows Insider.

Awesome! Another word to describe what it is like to be a Windows Insider.

The two words are, generally, not used at the same time to describe the experience.

Recently, however, that was, in fact, the case.

As an Insider, when Microsoft introduces new features or changes to Windows and asks the Insiders to bang away, we trust that the feature we are asked to go test is, you know, actually there.  Such was the case, very recently, when new features were added to the Photos app in Windows 10.  Microsoft made a huge deal out of the new features: ability to create a sharp video out of video clips and photos. It could pair it the right music and will have the ability to inject 3D objects that could interact with the objects in the video. It looked spectacular.  But, as it was to be an early release, not all features would be immediately available.  As it turned out, many insiders didn’t get the new features at all. See, what Microsoft failed to reveal was that a subset of Insiders were prevented-so the story goes-from getting the new stuff, on purpose, to serve as a ‘control’.  Now, why they needed this ‘A/B’ test is beyond me. I could see it for, say, different file systems–see who it worked on better, compared to a control population, but not for a feature so prominently featured in the BUILD 2017 conference. It was covered by all of the tech press and non-tech press.  One would think they would want maximum coverage. It is a cool feature.  But, no.  Microsoft saw fit to hold it back from many, including myself.  For reasons I don’t yet understand.  We were able to get the new bits, after emailing a request, signing a eula and waiting. A really nice, and patient, young lady helped through the ridiculous exercise. I finally got the features almost a week later. I was beginning to think it was bogus and only a few journalists had received it.  This is yet another example of Microsoft’s inability to capitalize on anything. While the features are pretty good, the experience is sub par because of what I had to go through.

So, that was the frustration part.

The more I use the new features, though, the second word comes into play.  Simply put, the new features are awesome with the best still to come. The slickness of the resulting video is striking and the ability for the application to pull out snippets of video is just cool. So, once I did get the new bits, the awesomness took over.

While the resulting goodness of the new Photos app is clear, and I appreciate the help the young lady provided while trying to get the new bits, it does not excuse the bait and switch that Microsoft subjected us to, nor does the lame excuse they gave.  Seriously? An ‘a/b’ test on a PHOTOS app? Really?