The thing with programming is, when you get interested in it and find out that you actually like it the probability that you become curiouser and curiouser and dive deep into it is high. We at LOTTO24 also take social responsibility and invite young people to get a glimpse into software development as part of the “Girls’ and Boys’ Day” so that they can discover for themselves if it is something they are interested in and enjoy. So let’s find out if you will go down that rabbit hole. 😉
Through programming, one can gain a deeper comprehension of complex problems as well as the will, the patience and ingenuity to solve them. We need to think creatively and solution-oriented, and to question how and why things work.
We have to:
To better grasp the possibilities, opportunities and risks of software and algorithms that surround us in more and more areas of daily life, it is of great benefit to have a basic understanding of programming. I think this is an important reason why we should all become digitally literate. But what can we do to make sure that we, young and old alike, are not only using technology, but really start grasping it? I think simply trying it out is the best recipe here.
Nowadays there are a number of simple and free applications that can be used to learn the basics of programming for no cost and in a fun way. These applications are available for almost every age and experience level – from simple web applications, to apps, to complex games.
The Calliope mini is a microcontroller (= a complete small computer on a single chip) that can be used to solve problems using code and hardware, implement ideas, or just to do fun projects.
The Calliope mini was designed so that it can be used by children as young as third grade.
What are some of the Calliope mini’s capabilities?
More information about the Calliope mini and where to get one can be found here: https://calliope.cc
Programming the microcontroller is possible via different development languages either
Depending on your level of experience, it makes sense to first familiarize yourself with the Calliope mini and programming in general. For programming beginners, visual programming is just the thing. Visual programming languages are more intuitive to use than textual programming languages. This makes it easy to learn the basics of programming. For instance, we can learn how conditions, loops or variables work without having to deal with text-based programming.
Connecting the Calliope mini
Before we can develop our first small program, we need to get our Calliope mini up and running. First we have to make sure that the Calliope mini is supplied with power. The easiest way to do this is to simply connect the included USB cable to the mini USB port of the Calliope mini and then plug the other end of the cable into the USB port of the computer.
After the Calliope mini is successfully connected to the computer, you should see it as a drive named “MINI” on your computer. If you need more information about connecting the Calliope mini, you can find it on this page: https://calliope.cc/en/lets-start/first-steps
Running the development environment
We will use Microsoft MakeCode as our development environment. MakeCode is a free platform that provides an engaging programming experience for beginners and advanced programmers into the world of programming. We will use MakeCode for visual programming only, but you can also use it to implement your programs in text-based programming languages.
To use MakeCode for our Calliope mini, we just need to go to the following website: https://makecode.calliope.cc
And here we go with our first little program. We will write a “Hello, World!” program first.
A “Hello, World!” program is a computer program that displays the message “Hello, World!”. Such a program is very easy to implement in most programming languages and is often used to illustrate the basic syntax of a programming language. It is usually the first program written by people learning to program. Furthermore, it can be used to make sure that the development environment works correctly and that the user understands how to use it.
The first thing we need to do is create a new project in MakeCode. In order to do so, we simply click on the “New Project” button and then give our project a name, for example “hello_world”. Now a new window opens and we see our development environment – This is where we build our programs.
The development environment is split into three different areas:
But now let us really get started and write our first program. On the right side we see that two blocks have already been added by default. Within the “on start” block we can add other blocks which should be executed when the program starts. In the “forever” block we can write code which should be executed for the whole runtime of our program.
Hence, we have successfully finished writing and executing our first program. While creating and executing our first small program, we learned all the important basics to be able to independently implement our own ideas with the Calliope mini in the future.
Our first program was very static and didn’t have any interaction with us – it just ran along. Now it’s time to bring a bit more activity into our program.
We are going to develop a dice! Just like a real dice, our dice will randomly display a number between 1 and 6.
After making sure we understand the task correctly, let’s think about exactly what is needed to implement this program. Please take some time to think about which functionalities we need and how you could implement them before you continue reading.
I have come to the following points that we need to implement in order to have the functionality of a dice:
I think you came up with similar points. The nice thing about programming is that there are usually many different ways to solve a task. For example, the idea I came up with is to shake the Calliope mini to start a roll. Maybe you had the same idea or you decided to press a button?
I’m only going to describe one possible solution here, but your implementation could be quite different.
If we now run the program in the simulator or copy it to our Calliope mini, each time we shake it, a new number between 1 and 6 will be rolled and shown on the display. You can shake the Calliope mini in the simulator by clicking on the “SHAKE” button at the bottom left of the Calliope mini image.
I hope you enjoyed this little introduction to programming and the world of the Calliope mini! If you found interest in programming, I hope you will stick to it and come up with and implement many projects on your own. If you realized that programming is not for you after all, I hope at least that I could offer you a little insight into the world of programming and that your world has expanded by a small block. 😉