The end goal of this class is to create a simple robot with inexpensive motors, Arduino micro-controller, and 3D printed parts which is controlled with a Smartphone.
The ‘controlled with a Smarphone’ part is where my ‘BlocklyBot‘ application comes in. I’m writing this software from scratch using Google’s Android implementation of ‘blockly‘, the popular visual block based programming language used in code.org’s ‘Hour of Code‘. Most of the kids at this point are familiar with Blockly, or familiar with MIT’s Scratch which Blockly was created after.
I’m about 6 weeks into the development of the app, which is my first Android app so there’s been a bit of a learning curve for me. Things are moving along well however and at this point I’m happy to say that I have the following features implemented:
- support for both Bluetooth and Bluetooth Low Energy devices
- movement (blocks for move forward, move backward, turn right, turn left, stop, and the MobBob emotes)
- speech synthesis (a block to make the robot speak any word/phrase of users choosing)
- speech recognition (a starting block that will execute when it hears any word/phrase of the users choosing)
- audio playback (a block that can play back an audio track from a set of pre-recorded tracks)
- audio note/tone generation (a block that can play back a specified musical note for a duration)
- basic logic and loop control blocks (for loops, while loops, if-then-else statements)
- event handlers (start blocks and if-then-else blocks for touch and listen events)
- basic variable support (a set of pre-defined variables to be used with block inputs)
With a couple of weeks left before the students use the program with their assembled robots I’m confident I will have all the planned features implemented and the program working well. The following are on my todo list still:
- Auto-connect (re-connect to the last connected robot)
- Google cloud sync (sync the blockly workspaces on the device with a google account (each student already has one for school) as a way to backup their code
- Testing and bugfixes (hopefully the program will be more or less bug free by the time the students need to start using it)
If you are adventurous and interested in testing the app for me you can find it by searching for ‘BlocklyBot’ on the play store or find it on the store’s web-page here.