[:en]Käsityökoulu Robotti took part in the Abu Dhabi International Book Fair 2015 as part of Smart Learning section located in the Creative Corner. We shared the section together with two other Finnish organizations. Olli-Pekka Kangas from University of Turku gave workshops on animation and Finnish company SmartFeet organized games in which the players moved around the Fair area using tablets. I as representative of Robotti was there to give workshops on Arduino programming.

Target group for our workshop was children from 8 years and up. At the end of the seven day fair the total amount of workshops had reached around 50 and approximately 300 children had taken part in them. One workshop took usually 30-45 minutes. Most children taking part in workshops were mostly 8-11 years old and more or less equally girls and boys. Only few of the kids had prior experience in programming.

This workshop was purely about programming. I built 8 Arduino based vibrobots with infrared interfaces for the workshop. I wanted them to look a bit hackish, something that could actually have been built by kids (in the future I will probably give couple of workshops were we build similar bot from scratch). The legs of this creature are bent from electric copper wire, with vibration motor wired to them. The electronics include a power mosfet, IR receiver module and LED.

In the workshop we programmed Arduinos with Arduino IDE using C++. One can ask whether C++ is the best way of starting to learn programming for an eight year old. I have been giving programming workshops to children in the past, but the experience I got in ADIBF made answering this question much easier. I did not see any major problems in writing ’proper’ programming language instead of language tailored for children. It seemed that as long as the results children get during the workshop are exciting, the motivation will be there. Personally I don’t find programming itself to be much fun, instead it is the results that motivate me in writing as robust and clear code as possible. In my experience it seems that for children the case is exactly the same. Having a good sense of drama also helps. Making things live is magic and you should not reveal the trick beforehand. In my workshop kids only found out that the bots can move, when they actually started to move – in every iteration this was a moment of surprise and excitement.

Arduino IDE is the good example about the scalability of the C++ language. Most of the people programming with it do not even realize that they are actually programming a microcontroller with language that is considered to be one of the most complex programming languages ever invented. Arduino is based on libraries that hide most of the complex stuff from the programmer and makes programming fairly easy. For this workshop I prepared a tiny library of my own that made the running of the vibramotor and IR communication trivial. After 30 minutes of writing, rewriting and deleting, the final program looks something like this (I’ll only include the main loop here):

void loop() {
  pinMode(13,OUTPUT);
  bot.waitIR(3); /* Waiting someone to press button 3 on the remote controller. */
  bot.walk();
  digitalWrite(13,HIGH);
  bot.waitIR(0);
  bot.stop();
  digitalWrite(13,LOW);
}

Basically during half an hour, children got a rough feel about what C++ is like (weird .,;(){} -signs and camel case compound), how vibration motors work (and how to build them), how infrared remotes work (and how to troubleshoot them) and finally what microcontrollers are and how they surround us in our daily lives. As we can see from the code example above, one needs to know fairly tiny amount of the features of the programming language in order to do a project using it. When skills grow and projects get more complex, one can improve his/her skills if necessary. C++ (or C) also gives good starting point for complete family of programming languages that share fairly similar syntax. You can find the library I wrote to simplify things here. One also needs to install IRLib.

Thanks for everyone who took part in the workshop(s)!

First photo by Riku Alkio.[:]