7 – Early Prototype and Decided Product Direction

Back to school after our Christmas break and I have just realised that I have not updated this in a while.

I have decided to take my product in a new direction. Originally I was planning to make a game to teach programming to young children, however now I have decided to create a more realistic environment. Instead of a Scratch like interface where the children play with a GUI to manipulate the Raspberry Pi, I have decided that I will allow the children to program using typing instead. The aim is thus to create a very friendly environment, with an intuitive API to allow the children to manipulate the Pi by typing actual code.

I have begun to create the API, however it is still at a very basic stage. I have basically grouped up lines of code to set up the hardware into a simple Setup() function to hide the complex looking code that is required to begin the programming. There are then simple functions to interact with the hardware such as TurnOnLED(ledName) where ledName is a string which is forced into lower case to prevent errors and then checked and compared to strings identifying each component on the board. There are similar functions to turn them off, and interact with the buzzer and switch.

These functions hide the complex code and instead allow the children to program using only function calls, which they will be able to use along with control statements to manipulate the hardware how the like.

There are still many problems to iron out however such as a better looking GUI, friendly feedback to the user so that they know where they have gone wrong instead of exposing them to complicated compiler errors. I also still need to add more functionality to the API to make it as intuitive as possible and help deal with errors better.

Currently the program works by writing what is typed into the text box to another file and then running that file as a python script outside of the program, which in turn interacts with the hardware. There are several problems with this which I will have to deal with in the future such as getting possible errors from the external file when it is ran and passing them back to the GUI to display, getting the API headers to be automatically wrote into the external file so that the children to not have to include the API themselves, and returning correct line numbers based on the code they have written, and the code in the external file with all of the headers in etc.

Below is a picture of the very basic GUI that I currently have:

Image

The “Save” button saves the text to the file and the “Run” button runs the file as a python script. I intend to get rid of both of these buttons in the future however and have a single “Compile” or “Run” button which does both of these. You will notice that I wrote the strings for the LEDs in an incorrect way, and you will see on the photo of the Raspberry Pi below that when the run button is pressed, thanks to forcing the entire string into lower case, that it still works fine:

Image

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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