Raspberry Pi Case Review 2: Cyntech and ModMyPi

A little while ago, I tried a pair of the early Raspberry Pi cases. Desiring a change, I fetched myself two more, one from British online retailer ModMyPi, the other from UK electronics firm Cyntech, which also worked with Pi specialist Pimoroni on the Pi Hub, reviewed here.

ModMyPi and Cyntech cases

The ModMyPi and Cyntech Raspberry Pi cases

Continue reading

Raspberry Pi Thermal Printing: an update

Reader Daniel Boira recently asked me if I’d experimented with printing large characters on the SparkFun thermal printer (see Hacking a Thermal Till Printer…) that I’d rigged up to my Raspberry Pi’s GPIO. I hadn’t done so, so I thought I’d give it a try.

Printing double-size text

Print characters tall, wide, or tall and wide

Continue reading

Upper-crust USB add-on for the Raspberry Pi: Pimoroni’s Pi Hub

Raspberry Pi accessory specialist Pimoroni reckons it has the answer to one of the tiny ARM-based computer’s signal limitations: too few USB ports for all the add-ons you might want to hook up to it at any one time.

Pi users have dealt with only having a pair of USB 2.0 ports – and there’s only one on the cheapest, the Model A Pi – by connecting a cheap USB hub. However, Pimoroni reckons most of the hubs users attach are not up to snuff: they’re not sufficiently powerful, being driven by a transformer pumping out no more than 1 or 2A, or deviate from the USB spec in ways that hinder their compatibility with the wee microcomputer.

Pimoroni's Pi Hub

Pimoroni’s Pi Hub: logo-tastic

Continue reading

Hacking a thermal till printer to work with the Raspberry Pi

I’ve always had a soft spot for Sinclair’s ZX Printer. Yes it was slow and the print was poorly rendered on its special aluminium-coated paper, which picked up greasy fingerprints like they were going out of fashion, but it was cute, compact and cheap.

The Sinclair ZX Printer

A Sinclair ZX81 and the ZX Printer
Source: Carlos Pérez Ruiz

Continue reading

How to program the Pebble smartwatch: Part 3

Update Pebble has released version 2 of its OS and this invalidates much of what follows, which was written for an earlier version of the OS.

As it stands, the app I created in Part 2 appears in the Pebble’s menu simply as a name, Ball, which is entered into the boilerplate PBL_APP_INFO created by the SDK’s create_pebble_project.py script. This also sets the app’s unique UUID, which you’ll see at the top of the file. You can also modify this to set the app’s version number and to add your name as author.

But what’s really needed is a menu icon, and you can add one by editing the resource_map.json created for you in the /resources/src folder within the project folder.

Continue reading

How to program the Pebble smartwatch: Part 2

Update Pebble has released version 2 of its OS and this invalidates much of what follows, which was written for an earlier version of the OS.

In Part 1 we got our basic Pebble app up and running, but it doesn’t do very much. Let’s add some user interaction.

To respond to button presses, Pebble OS now uses a system akin to its event handling mechanism, the better to help the coder give the user more ways to control the three-button watch. The new approach lets you directly accommodate single clicks short and long, double-clicks, and press-and-hold events, rather than simply waiting for a push on a specific button and then trying to anticipate the user’s intentions.

The Pebble SDK, then, defines a ClickConfigProvider entity which is essentially an array of function calls for specific buttons and the various ways each of them can be used. This list of calls is attached to the host window. First, we need to add the line

    window_set_click_config_provider(&window, (ClickConfigProvider)config_provider);

to the handle_init() initialisation function, and we need to run it after the app’s Window – reached using the pointer variable window – has been pushed onto the OS’s Window stack, or it will be ignored. The above line tells the window where to get its array of button configurations from, which it does by calling a second function, the config_provider passed in the first call.

Continue reading

How to program the Pebble smartwatch: Part 1

Update Pebble has released version 2 of its OS and this invalidates much of what follows, which was written for an earlier version of the OS.

Pebble didn’t invent the smartwatch, but it has done more than most to bring this new product category to the attention of the world, largely thanks to its hugely successful and well-reported Kickstarter funding campaign.

Pebble’s smartwatch – also called Pebble – remains one of the few of its kind that go beyond duplicating a host phone’s notifications and messages on its own screen. Pebble will do all that of course, but much more interesting is the SDK Pebble provides to allow C programmers to create clever new watch faces and, better still, native apps to run on the smartwatch’s 144 x 168 black-and-white screen.


Your app will appear below the Pebble’s Settings icon

Continue reading