# PocketCHIP or Pi? by Seth Kenlon When the Raspberry Pi hit the tech scene, it made a huge impact. It wasn't the first tiny computer, by any means; there was the Chumby, and the PogoPlug, and other hackable systems on chips, but nothing quite so intentionally open and affordable as the Pi. You didn't have to hack the Pi, you just put an OS on an SD card, booted, and you were running an open source computer. And the computer you were running only used a dozen watts of power, and wasn't encased in a bulky plastic body that would end up in the landfill when you decided to upgrade. Best of all, it came at a time when the blossoming "maker" movement just happened to be looking for processing power. With the market primed for tiny computers, several similar projects surfaced, and when [The Next Big Thing](https://getchip.com/) announced "the world's first $9 computer", called simply the "CHIP", the idea got funded in days on Kickstarter. The CHIP variant, the PocketCHIP, is an all-in-one $69 system featuring a screen, the CHIP, an on-board battery, and a physical keyboard. ![The PocketCHIP](pc_glamour.png) The question is, how does the PocketCHIP compare to the ubiquitous Raspberry Pi? ## All-in-One Hardware ### PocketCHIP I took the PocketCHIP with me to the [All Things Open](https://allthingsopen.org) conference in 2016 as my conference computer. I had to bring a laptop along for a presentation that I was giving, because the presentation involved compiling and running applications specifically on x86_64 architecture, but I only used that for my presentation. Otherwise, I used my PocketCHIP for everything from working online to taking notes during meetings and tech talks. One of the distinct advantages of the PocketCHIP over a Pi is that the PocketCHIP is designed as an all-in-one device. There are no hidden costs to the PocketCHIP. You buy it, and you've got a self-contained computing device, with a screen and a keyboard and WiFi and Bluetooth, and power, and a repository full of all the best open source software available. Sure, you can buy a Pi and a screen and a battery pack and, unless you get a Pi 3, a WiFi dongle and a Bluetooth dongle and you'll have something approaching the PocketCHIP's portability. You might even go to the trouble of [constructing a case](http://thingiverse.com/thing:2091747) for it. For an off-the-shelf experience, though, PocketCHIP is the way to go if you're looking for a "hiptop" computer. Better yet, the PocketCHIP maintains the same modularity of the Pi, because the PocketCHIP can be easily taken apart to free the CHIP from the case. So if you only a portable hiptop device some of the time, and you prefer the smaller form factor of just the CHIP board other times, you get both with the PocketCHIP. The glaring weakness in PocketCHIP's all-in-one design is the keyboard. While it's a great idea to have a physical keyboard, and I wouldn't give it up, I only consider it a backup keyboard at the best of times. It's not that I mind typing on keys seemingly made of bubble wrap, it's that key presses only register about 66% of the time. That's within tolerance for small one-off tasks, but if you're writing code or taking notes at a tech conference or writing an article (like this one, in fact), it's a showstopper. I ended up resorting to a Bluetooth keyboard within days of owning the PocketCHIP, and now I don't bother taking one without the other. So much for all-in-one. To be fair, though, I have the same feeling about touch screen phones and tablets. But wait, it gets worse. Unlike the standard CHIP, there's no GUI interface for Bluetooth on the PocketCHIP. Pairing with a Bluetooth device, even a trusted one, is a process that, in itself, requires several commands. It's recursively maddening to be hindered by the very keyboard you're trying to replace, but it's Linux, so you can just script it: #!/bin/bash ARG="${1}" help() { echo "Connect a Bluetooth device to PocketCHIP" echo "Usage: $ [MOD=1] ./blue.sh BLUETOOTH_ID" echo "Optional: put your device ID into ~/.bluechip" exit 0 } xkbfunc() { setxkbmap dvorak xmodmap $HOME/Xmodmap.logitech exit 0 } if [ -e ~/.bluechip ]; then ARG=`cat $HOME/.bluechip` elif [ X"$ARG" = "X" ]; then help fi echo "Using ID $ARG" sudo systemctl start bluetooth || echo \ "Bluetooth already started or cannot be started." sudo \ echo -e "power on\n connect $ARG \nquit" | bluetoothctl xkbfunc Aside from the keyboard, the PocketCHIP is exactly what it appears to be: an ultra-portable pure-Linux machine. This isn't an Android phone with a Linux chroot inside of it, this is Linux on a portable, self-contained, [Tricorder](http://memory-alpha.wikia.com/wiki/Starfleet_tricorder)-sized device. ### Raspberry Pi The Raspberry Pi wasn't designed to be an all-in-one system. In fact, you might argue that one of its strengths is its modularity. The Pi itself isn't modular, it's a minimal configuration for a computer system with all components either burned into its chip or soldered to the board, but it's a computer that you can hook up to a tiny LCD screen, an HD monitor, an array of LEDs, or any other peripheral you please, or none of these things at all. It's worth noting that the CHIP itself (without the case and screen and battery that makes it a PocketCHIP) is equally versatile. But there's at least one thing that sets the two apart: removable storage. Every Raspberry Pi, aside from the Pi Zero (which was released after the CHIP was Kickstarted, perhaps coincidentally?), has featured an SD card slot. This makes it trivial to copy a Linux distribution onto a Pi; `dd` it over to an SD card, resize the file system as necessary, boot the Pi, and you're up and running. It's not as easy on the CHIP or PocketCHIP. The storage is embedded, meaning that to load a new OS on the CHIP, you have to flash the CHIP's chip, much as you would a mobile phone. My first experience with embedded Linux was the [Nokia N800](http://en.wikipedia.org/wiki/Nokia_N800). Being embedded, it required flashing to get its Linux-based OS, Maemo, loaded or updated. Flashing was done with a shell script from your computer to your connected N800; it was simple and effective. Playing with mobile phone OS images is trickier, since it usually requires a special bootloader and Android Studio for the ADB toolchain. The PocketCHIP's official method of flashing your device is done through your web browser. As such, it feels almost familiar, or at least non-threatening. Maybe it's over-simplified and clunky for a serious geek, but for new users, it's a simple interface to freshen up or rescue the PocketCHIP when something goes amiss. It's not an SD card that you just pop in and go, but it's as close as you'll get with an embedded OS. ### GPIO At least for the Maker movement, one of the main appeals of the Pi is its GPIO pins. If you've never used the GPIO pins, you've at least seen them. They're the pins along the side of the board that allow the Pi to interact with other electronic devices, whether it's an LED light, an LED array, an off board micro controller, thermal sensors, light sensors, or anything else you can imagine. The CHIP has GPIO pins, too. In fact, the GPIO pins are what attach the CHIP to the PocketCHIP board and provide the screen output and keyboard input. You might think that means the CHIP's GPIO pins are occupied when in PocketCHIP form, but amazingly the clever folks over at The Next Big Thing thought of that already, and mapped new GPIO pins along the top of the PocketCHIP case so that you still have programmable GPIO pins no matter how you're using it. I haven't done any serious work with the CHIP's GPIO pins yet, but during testing, I found the GPIO pins to be a little more versatile than those on the Pi. For instance, I was using the Pi for an art project last year that triggered an array of LEDs and, in the mean time, played a sound clip. Unfortunately, playing a sound on the Pi interferes with the GPIO subsystem; the LEDs would light up, but erratically, and the sound was often distorted (depending on how I played it). The answer ultimately was to off board the LED control to an Arduino, triggered by the Pi, and play the sound from the Pi. So far, on the CHIP, I can get no such distortion. My caveat here is that I no longer have access to the number of addressable LEDs that I was using on the Pi, so it might be possible to break the CHIP's spirit eventually, but so far I've been impressed with just how much the CHIP can do all at the same time, without interference. The Pi does have more GPIO libraries than the CHIP does, however, so depending on what you're trying to achieve, there still may be a need for a Pi or an Arduino. Luckily, the [Adafruit](http://adafruit.com) libraries have been ported to the CHIP, so for many of the common electric components available online, there are ported libraries ready for you to use. Additionally, it's trivial to port most Python code written for a Pi to a CHIP. Pin numbers need to be changed, and there's no need to specify a pin mode as you do on the Pi so some lines get deleted, but everything else is the same as long as you imported `RPi.GPIO as GPIO` and `CHIP_IO.GPIO as GPIO` (a great argument for abstraction!). ## Battery Power Speaking of great board design, the battery and power system on the PocketCHIP is as modern and convenient as you could possibly hope for. The battery's internal, insofar as it's on the inside of the plastic casing. It can be swapped out as needed, since the case comes apart pretty easily, but that's too much work. The great thing about the PocketCHIP is that The Next Big Thing expertly engineered it to receive power from either its on-board LiPo battery, or from its USB port, if you plug in a mobile phone power pack or plug it into a USB charger in a car, airplane, or at home. What that means is that the PocketCHIP acts just like a laptop or mobile phone when it comes to making sure you've got a charge. If you're running low on power, you plug your PocketCHIP into a USB charger or a power pack. If you need to get up and go, you unplug the power and run off internal battery. All of this happens seamlessly, without interruption. Compare that to the Pi, and you'll understand why this is exciting. There may be solutions I'm not aware of, but for a reliable battery power flow on the Pi, my research has shown that a LiPo interface must be used between the USB power pack and the Pi. As far as I know, there's no way to attach a LiPo battery to the Pi, much less charge it through one of the Pi's USB ports. There have been several Pi hacks to extend battery functionality, and that's one of the Pi's strengths: it is exactly what it claims to be, an educational device that emphasizes and encourages homemade hacks to make it into something bigger and better. It's not pre-packaged and magical, it's raw and ready to be worked on. ## Ports The PocketCHIP has three ports: * USB * Micro USB * Audio There's an HDMI adapter available for the CHIP. It's a sort of "hat" (in Pi terminology) that plugs into the GPIO pins and provides an HDMI output. With that many pins, it's not easy to put on or take off; I got one for free as a Kickstarter reward, but I wouldn't recommend it. The Raspberry Pi has a lot more: * 2 USB * Micro USB * Audio * Analogue Video * HDMI * Ethernet That's a huge difference, and it potentially could be deal breaker depending on your use case. For example, I have yet to even bother using my CHIP as a dedicated server, while I've got a Raspberry Pi and a Banana Pi in two different countries hosting websites. I could do it with a CHIP, but I doubt I'll ever bother getting the USB-to-Ethernet dongle I'd need to make it work the way I would expect. On the other hand, I have yet to take a Pi to a coffee shop for an afternoon of coding. ## Applications When you boot the PocketCHIP, it boots to a custom launcher screen featuring easy access to its 6 [default applications](https://docs.getchip.com/pocketchip.html#applications). ![The PocketCHIP launcher screen.](launcher.png) This launcher screen is customizable by modifying a JSON file hidden away in /usr/share, but it's a hack. It's pretty obvious that the PocketCHIP team didn't account for modifying the launcher screen, although they have stated in their forum that a better solution is in development. Rather than spend time hacking the launcher screen, I mostly use either the Terminal to launch applications I've installed with apt, or else use the launchers from /usr/share/applications directly in the included File Manager. The important thing is that applications are plentiful. You've got a tiny screen to work with, and not all applications were designed for that, but they're available, so you can install what you want, configure those that need an allowance for the small screen, and use what you need to use. The problem is that the PocketCHIP is an embedded system. It has limited storage space, and no builtin solution to install applications to an external device. If you know enough Linux to hack around that, then you can avoid running out of space for applications, but if you can't be bothered to do that or you just don't yet know how, then it's something to consider. One of the most heavily promoted applications on the PocketCHIP is Pico-8, a closed source game engine. I lobbied for this application to not be pre-installed when it got introduced as a "bonus" during the Kickstart campaign, but I was apparently in the minority. You can uninstall it with `apt remove chip-pico-8` and save 2.5 MB whilst also purging it of closed source. Replace with the excellent open source alternative, [Love](http://love2d.org), with `apt install love`, and then hack the launcher screen to remove the PICO-8 entry. The Pi has the advantage here. Not only doesn't it ship with closed source applications, you get to pick the amount of storage you use, so you can install everything you need, plus your user data. ## The all-important bottom line The Raspberry Pi and the PocketCHIP are difficult things to classify. Are they low-power and low-cost headless servers? are they smart TV backends? are they controllers for robotics projects? retro arcade game emulators? hiptop computers? Well, they're all of these things. If it's a mobile computing experience you're after, then the PocketCHIP is a well-designed, expertly-engineered single board computer ready to go. In a way, it's similar to buying a [System76](http://system76.com) Linux laptop: you buy the luxury of not having to think about the hardware. You have everything you need, and everything just works. Any hacking you do will be on code, not on hardware. The Pi is a little more raw. If you want it to be a mobile solution, you have to build that yourself. As a server, however, it's just the opposite. I heartily recommend both.