Using a Raspberry Pi as a desktop PC replacement.

It started with a glass of water… and our old laptop. We probably wouldn’t have used the laptop at all, but it ran Vista which meant that it supported our old-ish Canon Canoscan LiDE scanner. The scanner is, in my view, gorgeous –  it’s light, slim and produces good scans. Sadly, Windows 7 or Windows 10 drivers are unavailable for the scanner. I’m not binning or replacing perfectly good kit, so we’re keeping it!

Unfortunately, a clumsy accident with the glass of water meant that the laptop doesn’t work any more. Just when I needed to do some scanning.

Back in the early days of Raspberry Pi use, I had some minor success with scanning from the command line, but now I know a bit more. I installed XSane, fixed some permissions with the way it handles writing to a folder (can’t remember what, though), and off I went. No problems. The batch mode is especially good for scanning a bunch of photos. 4 at a time and just walk away.

Pi-top CEED

All this was running on my Pi-top CEED. I’d picked this up as a kickstarted and now I’m so pleased with it. I’ve got a wireless keyboard and mouse, and the Raspberry Pi 3 inside really shifts it along well. It boots faster than our Windows 10 laptop and I’m not having to put up with the sound of a fan. It connects with no problem to our NAS and I’ve also managed to pair it with the shared printer.

So, the question remains, what would I install? I’ve got the following, squeezed on to the 8Gb card:

  • CUPS used to connect to a shared printer connected to our laptop. I’ve done this before and found it easier to share than trying to get the now-deceased Vista laptop sharing the printer.
  • XSane to run the scanner. I can scan individual images or a bunch at a time in batch mode.
  • GIMP loads WAY faster on the Pi-top CEED than it does on the Win Laptop. Very useable for the brief experiments I tried.
  • Open Office of course.
  • Seq24 for making music. Runs on my MIDI setup elsewhere in the house, but the Raspberry Pi 3 is also able to run some software synthesizers too. I’ve installed Rosegarden which seems to work well, but I need the time to learn it. It sure looks full-featured.
  • Audacity seems to run well, although I did have it crash once on a file. Not sure what and I didn’t have the chance to try again.
  • Fritzing is a PCB and breadboard design package. Works well and could be handy although I’ve spent so much time in our school’s PCB package that I’m not ready to leave quite yet.

There’s a few other packages that I’m using, but for the most part these are the ones I’ll need for general office-type productivity. My conclusion is that, for me, the Pi-top CEED is an excellent desktop replacement.

I’ll just move the glass of water out of the way…

Advertisement

Game programming in Scratch

xwingpicNot much to write about this time round (seems time is getting even more sparse these days…) but I wanted to post a little game created with my son in Scratch.

Usually, Scratch programming gets put on the back burner – I’ve often got other projects in mind and so I tend to neglect Scratch. This half-term, my son asked for an introduction to programming and so game writing was on the cards. We worked through some simple thoughts and it ended up being inspired by the Star Wars films since he’s quite a fan.

I particularly wanted to show how a simple game can be built up incrementally, starting with simple movement of a space ship and then adding asteroids that have to be dodged. These were given a simple animation of top-to-bottom to give an impression of forward movement.

Once this was working, the detection of hits came in. This was relatively easy – I’m always so impressed at how Scratch offers this as standard, particularly as I’ve tried writing this type of game as a late teenager in Forth on my Jupiter Ace. With that, the nearest one could get was redefining the character set to look like the objects being controlled and then deciding if you’re near enough.

The next stage was to add some kind of missile or torpedo. I know there are a number of ways of solving this but my preferred method was to make the spaceship’s x-position into a global variable (Available to all sprites). This is an excellent introduction to variable types, particularly as we forgot to tick the correct box initially.

A simple game like this is an excellent introduction to programming – it ticks all of the boxes of sequential instructions, conditional branching and iteration, with a generous smattering of local and global variables.

Our little game doesn’t have any custom sound effects, or a timer. These are no real challenge to add.

The final file is available to download for anyone who wants to try it.