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.

No comments:

Post a Comment