Ben Nuttall’s top 10 add-on boards for the Raspberry Pi

I don’t normally feature this kind of ‘list’, but it’s Ben Nuttall from the Foundation and I really appreciate his opinion. He’s picked his top 10 favourite add-on boards for the Raspberry Pi and published it over at opensource.com. Take a look here. We’re on pretty much the same wave-length, actually – some very good boards here. I would have shown some love for the 4tronix motor controller boards too, though, particularly the Picon ZeroNow if I can only find out where he got that handy storage box from…

Adventures in Coding – book review

Adventures in Coding cover

Another interesting release from Wiley. I’ve been sent this and another book to review, but I’m free to give an honest opinion.

Introduction

Adventures in Coding by Eva Holland and Chris Minnick is another in the series of “Adventures” books that was started a couple of years ago by Carrie Anne Philbin with her book Adventures in Raspberry Pi. The two authors founded online training company WatzThis? and have collaborated on books in the past including JavaScript for Kids for Dummies.

Adventures in Coding is a book about Scratch and how to use it to develop apps, games and art. This surprised me a little – all the previous books in the series have had very specific titles – Adventures in Raspberry Pi, Adventures in Python, Adventures in Minecraft, etc. I had expected Adventures in Coding to cover a broad cross-section of languages. Why it wasn’t called “Adventures in Scratch” I don’t know, but it seems a strange choice to pick a generic title.

Chapter-by-Chapter

Chapter 1 introduces coding and various broad concepts but it doesn’t hang about. Within a few pages, you are introduced to the Scratch programming environment and you’re off and running on your first piece of ‘code’. This involves moving Scratch the Cat about on the screen and teaches you how to create your first loop. Kudos to the authors for getting this basic programming concept into the first few pages – really gives me hope for the rest of the book. As well as Scratch the Cat, you are introduced to the idea of adding other sprites to the Stage and you also implement collision detection. The final part of the chapter is a guide to understanding the Scratch environment. This is quite intense, perhaps too intense, but it is necessary to doing more with the environment.

Chapter 2 continues your ‘adventures’. It covers changing the backdrop of the Stage and then moves onto more interesting stuff such as an introduction to cartesian coordinates and the idea of the compass so that you can determine in which direction you are moving. You learn how to take input and respond accordingly and then learn about different ways of moving sprites. The chapter also introduces Scratch’s random number generator and teaches you how to create ‘random art’ using them by drawing with the pen. This random art constitutes the result of this adventure. I found it a slightly odd chapter as there are several seemingly disconnected things going on. However, it is slowly building up your grasp of the Scratch language and environment, so I can see what they’re going for.

Chapter 3 talks you through the concept of nested control loops – what they are and why you should use them; later in the chapter, it returns to them and gives you more detail. It then moves on to if… then… blocks to introduce conditional programming before starting you on boolean logic and which block to use to do it. Commenting your code is vitally important and Scratch has a way of doing it. The chapter shows you how to do this and explains why it is a good idea. The remainder of the chapter talks you through building a game in Scratch using all of the knowledge and skills you’ve acquired so far.

Chapter 4 involves using sensing blocks to sense typing, mouse movements and other things and having them interact with your programmed sprites. It also teaches you about timers and when you should use them. The chapter finishes with the fourth adventure which involves creating a maze with an apple to collect.

Sample page from Adventures in Coding

Sample page

Chapter 5 is all about event blocks, or event-driven programming. It teaches you how to make your app or game do something when a particular event happens. The chapter ends with a really big project to solidify your knowledge.

Chapter 6 introduces variables and lists, yet more vital programming concepts. I was surprised this chapter hadn’t come sooner, as I consider variables in particular to be a be more basic skill than, say, event-driven programming. The chapter ends with the reader creating a party planning app which uses variables and lists to keep track of who has attended a party. It’s a fairly short chapter for a basic concept.

Chapter 7 introduces operator blocks which can be used to affect numbers and strings. It uses this concept to help you create a mathematics testing game. Random numbers are added together or multiplied and then the user has to correctly work out the answer and type it in.

Chapter 8 delves more into the use of the Paint Editor. It takes you through various tools that you’ll use eventually to create an animation of a skywriting plane, the eighth adventure.

Chapter 9 introduces the exciting concept of creating your own custom blocks. This is analogous to creating your own functions in other languages and it’s a powerful tool built into Scratch. You use custom blocks in the adventure’s main project – a Fashion Show.

Chapter 10 is all about audio. You use Scratch’s in-built sound effects library and learn how to record your own, edit them and import them for use on Scratch’s Stage. Using the sound library, you create the “Scratch Jazz Band”.

Chapter 11 shows you how to expand your knowledge by using the Scratch website to share projects, look at projects published by others and interact on the forum. It also shows you how to use Makey Makey in conjunction with Scratch to interact with the real world. The banana orchestra, unsurprisingly, makes an appearance! Also covered (briefly) is the PicoBoard. It does feel a little like a padding chapter, in that not much is gone into in detail, but it’s all still useful stuff.

There are a couple of appendices in the book. The first deals with installing the offline Scratch editor and the second deals with good practice for debugging and testing your programs. A glossary and index finishes the book off.

Opinion

This is another excellent release from Wiley, and a worthy entry in the Adventures in… series. The book is full-colour throughout and everything is explained very well, step-by-step. The language is clear and well-written and is clearly aimed at a young audience. It’s possible that a young reader might struggle a little but with the proper guidance and assistance from an adult, it should be easy enough for them to understand what is being asked of them. The emphasis is on short, punchy how-to steps with longer sections of explanation.

Overall, an excellent book to introduce young readers and parents to Scratch and a great resource for teachers to use to get started with coding.

You can get hold of the book from Wiley or Amazon.

Raspberry Pi Zero with accelerometer and tiny, tiny screen

Jeremy Lee has taken a Raspberry Pi Zero and connected up an accelerometer sensor. He’s then written a driver to allow the sensor to act as a mouse and then recorded himself looking around a Minecraft world that is displayed on a tiny screen. It’s all very neat and he’s written it up as a kind of walkthrough. Take a look here or view the demo video below. It’s certainly the smallest Pi/GUI set-up I’ve ever seen!