All the machines around us that do things by themselves can do so simply because someone gave them the appropriate instructions. The video game on your tablet, the website you’re surfing, the menu of your camera… In every case, someone had to write a code in order to tell them how to function.
If you’ve already tried the 3, 2, 1 Action! game in the Zowi App, now you’ll be going one step further into the world of programming.
Computer programs are usually written in a very textual format. In this case, Zowi’s brain needs to be programmed in Arduino code. Here’s an example:
Look at all these letters! This code is real drag! Right? Don’t worry, to help you start programming Zowi, we’re going to show you a really simple programming tool called Bitbloq.
Bitbloq generates instructions in Arduino code in a very simple way, which is based on fitting coloured blocks together, one by one. Each block represents a different instruction. You will see that Bitbloq has some blocks designated specially for Zowi, so all you need to do is put the instruction blocks in the right order. It’s very similar to 3,2,1… Action! but with even more possibilities.
Did you know…?
“Hello World” is traditionally the name of the first program a newbie writes when starting to learn a programming language. In computer programming, it’s usually pretty simple to display the phrase “Hello World” on the screen. It’s been this way since 1978, when the first “Hello World” appeared in Kernighan and Richies’s book The C Programming Language.
Go to the Bitbloq website via this link: http://bitbloq.bq.com. Click on “TEST IT NOW”
Unlike humans, in order to learn new things, Zowi needs to delete what it already knows to make space for new information: the new program. This is known as “reprogramming“. In this project, we will be programming Zowi so it learns how to do new things. When you do this, the A and B buttons will do something else. When you finish the project, you can restore the original functions via the Settings and they will go back to working as they did before. Learn more about Reprogramming Zowi in the “Zowi, the alarm robot“project.
Experiment 1: Hello World basic program
- Go to the Software tab
- In the coloured tabs on the right, you will see one called Zowi Movements
- Look for the block that says Zowi, show… and drag it into the Setuparea.
- Click on the arrow to reprogram Zowi. Don’t forget to make sure Zowi is switched on.
What happens? Zowi’s not the same as before!
Bitbloq only works with Google Chrome.
Bitbloq requires the Web2Board add-on in order to work. If you’re using Bitbloq for the first time, follow the instructions to install it.
If you need help, click on this link: http://bitbloq.bq.com/#/bitbloq-help/
Experiment 2: It’s your turn…
Remember to press the arrow to reprogram Zowi every time you make changes in the blocks.