Bitbloq I: Hello World

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:

captura_zowi_codigo_arduino

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.

zow_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.

 

Configuring Bitbloq:

Go to the Bitbloq website via this link: http://bitbloq.bq.com. Click on “TEST IT NOW”
captura_inicio_bitbloq

Within the interface, select Zowi under Robots and drag it into the centre:
Captura_zowi_bitbloq_1
Captura_zowi_bitbloq_2

Connect your Zowi to the computer via the USB cable.
06_programacion_1280x720

Warning!

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

  1. Go to the Software tab
  2. Captura_zowi_bitbloq_3

  3. In the coloured tabs on the right, you will see one called Zowi Movements
  4. Captura_zowi_bitbloq_4

  5. Look for the block that says Zowi, show… and drag it into the Setuparea.
  6. Captura_zowi_bitbloq_5

  7. Click on the arrow to reprogram Zowi. Don’t forget to make sure Zowi is switched on.

Captura_zowi_bitbloq_6

What happens? Zowi’s not the same as before!

Warning!

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.
web2boardcolor
If you need help, click on this link: http://bitbloq.bq.com/#/bitbloq-help/

 

Experiment 2: It’s your turn…

  1. Change Zowi’s mood with the block that says Zowi, show…
  2. Captura_zowi_bitbloq_7

  3. Experiment and play around with the different action blocks.
  4. What happens if you place several blocks one after another?

Remember to press the arrow to reprogram Zowi every time you make changes in the blocks.

Experiment 3: Setup vs. Loop

  1. Move the mood block to the Loop area and see the results of reprogramming Zowi this way.
  2. Captura_zowi_bitbloq_9

  3. Do you get why it’s called “loop”? What happens if we put several blocks here one after another?