Sunday, January 25, 2015

Lesson 63 - Raspberry

A Raspberry Pi came from the mail and has been lying on the kitchen table for a while. 

It's essentially a little, dirt-cheap computer that can run Linux and has HDMI output, LAN connector and a couple of USBs. The interesting part for me is that you can easily plug in a Wifi adapter and you can use the GPIO pins to control electronics like LEDs and motors. And when I say motors I mean ROBOTS. Autonomous, Internet-connected ROBOTS.

I guess I was nibbling this skeletal little computer when my daughter asked me to have a "computer lesson" again. We discussed the Raspberry a little, but then went to draw the computer on a whiteboard. This is what it became. 

It's 95% drawn and written by her.

We started from CPU and its central role as the part that runs her programs. Then to RAM from where the CPU reads its instructions. And then, what do you think happens to the stuff in RAM when you unplug the power cords (drawn in the diagram). Her answer was funny, but I unfortunately forgot it already. Then we went on to persistent storage, or "hard disk", display, keyboards, USB connectors and stuff. She enjoyed drawing a lot!

Then we took a look at the Raspberry that looked like this.

All the parts are neatly exposed on this computer, ain't they! We identified the parts in her diagram that were currently missing in the Raspberry and marked them with red magnets. Then we added an SD card as the "hard drive" of the computer.

I installed a Wifi dongle (took me a while, I admit), created her an user accound. Later I told her that even though we don't yet have a keyboard and a display for the Raspberry, she can use it via network. She was quite enthusiastic to try it so we logged in using SSH using her own computer.

Once there, we decided to create a file using vim (which I pre-installed of course). As usually it took quite a while to select a suitable name for this new file, especially when she had to negotiate it with her baby sister. Eventually she kinda pulled rank and decided to name the file after herself. The naming debate had exhausted her though and she quit before even starting to think about what the file should contain.

Fun day! I especially recommend the drawing part. Afterwards I wrote a little Python program that blinks a led. Maybe we'll create a Raspberry robot soon. I have motors and stuff you know.

Tuesday, January 6, 2015

Frozen Dragons

Yesterday we had a Movie Night with our family. We watched the film Frozen featuring the princesses Anna and Elsa who seem to be the current idols of our daughters.

Today my bigger girl made yet another Christmas card with Scratch and then went on to to discover that Anna and Elsa are now featured as the first tutorial! So now she's drawing beautiful drawings on the ice by coding. It's a very nice tutorial indeed, but depends very much on angles. Like, you need to do an 120 degree angle there and a 90 degree angle there. Fortunately you can pick the angles from a dropdown...

Another nice thing we've been playing lately is Dragonbox that's not directly related to programming, but teaches algebra instead. Even our 3-year old is able to solve simple math equations!

While the 3-year old was solving equations, the 5-year old built a robot out of Lego Mindstorms bricks. I guess we'll have to do some robot programming soon.