PythonIsh now running on Connected Little Boxes

I’ve just spent the day playing with PythonIsh. It’s a tiny language that I’m adding to my Connected Little Boxes. It originated in the Hull Pixelbot, but now I want use it to make it easy to program all my different devices. Today it actually worked properly for the first time, which is nice.

The idea is that you can write tiny bits of code that run in response to events on devices. You can save program files in the device and one program can load in another. You can also enter a new program while an existing one is running. And, as you can see above, the device can host a website where you can enter code. You can also edit code online and send it to a device over MQTT.

It will be out soon on GitHub.

HullOS in the Hull Pixelbot

I've spent a day having some "quality time" with the Hull Pixelbot scripting language. Which is now called HullOS.

The idea is that the computer in the robot (which can be a lowly Arduino Uno) is entirely responsible for converting the plain text of the program into actions. The behaviour will be rather reminiscent of the early 8 bit computers like the BBC Micro and Sinclair Spectrum, which had built in BASIC. They had tiny processors a bit like the one in the Arduino, but they had a lot more RAM than I've got. However, I've just about managed it. A typical program will look a bit like this:

do
    if %dist<10
        yellow
        move -10
    else
        green
    endif
forever

This HullOS program would make a "cowardly robot". The program repeatedly reads the distance sensor. If the robot is less than 10 cm from something it turns the pixel yellow and moves backwards. Otherwise it turns the pixel green. 

There are a few things to sort out, but I'm rather pleased with how it is going. And I've still got around 500 bytes of memory left....