Tag Archives: ebook

Detecting motion: DLP-TILT 2-axis accelerometer

Using an accelerometer to assess musculoskeletal stresses

Accelerometers are helpful for characterising device usage and detecting the mode of use. Most of these devices have an internal accelerometer, but it is convenient for our purposes to use an external device (requires less programming and does not require a jailbroken device).

Setup

In order to use this device, you must first set up the serial port with a line like the following:

stty -F /dev/ttyUSB0 raw ispeed 38400 ospeed 38400 cs8 -ignpar -cstopb -echo

Code

The code probably won’t tell you all that much, but here’s one way to make your life much easier: assuming you’re running this on Linux, set your device ID as /dev/dlptilt, then change the line ‘/dev/ttyUSB0’ to read ‘/dev/dlptilt’ in the code before compiling.

#include
#include
#include
#include
#include
#include
#include
#include 

#define BAUDRATE B38400
#define MODEMDEVICE "/dev/ttyS1"
#define _POSIX_SOURCE 1         //POSIX compliant source
#define FALSE 0
#define TRUE 1
#define DEBUG 0

volatile int STOP=FALSE;

void signal_handler_IO (int status);    //definition of signal handler
int wait_flag=TRUE;                     //TRUE while no signal received
char devicename[80];
long Baud_Rate = 38400;         // default Baud Rate (110 through 38400)
long BAUD;                      // derived baud rate from command line
long DATABITS;
long STOPBITS;
long PARITYON;
long PARITY;
int Data_Bits = 8;              // Number of data bits
int Stop_Bits = 1;              // Number of stop bits
int Parity = 0;                 // Parity as follows:
                  // 00 = NONE, 01 = Odd, 02 = Even, 03 = Mark, 04 = Space
int Format = 4;
FILE *input;
FILE *output;
int status;

main(int Parm_Count, char *Parms[])
{

   int fd, tty, c, res, i, error;
   char In1, Key;
   struct termios oldtio, newtio;
   struct termios oldkey, newkey;
   struct sigaction saio;
   char buf[255];
   char message[90];

   // set device name here
   strcpy(devicename,"/dev/ttyUSB0"); 

   newkey.c_cflag = BAUDRATE | CRTSCTS | CS8 | CLOCAL | CREAD;
   newkey.c_iflag = IGNPAR;
   newkey.c_oflag = 0;
   newkey.c_lflag = 0;
   newkey.c_cc[VMIN]=1;
   newkey.c_cc[VTIME]=0;
   BAUD=38400;
   DATABITS=CS8;
   STOPBITS=CSTOPB;
   PARITYON=0;
   PARITY=0;
   fd = open(devicename, O_RDWR | O_NOCTTY | O_NONBLOCK);
   if (fd < 0)
   {
   	perror(devicename);
   	exit(-1);
   }

   saio.sa_handler = signal_handler_IO;
   sigemptyset(&saio.sa_mask);
   saio.sa_flags = 0;
   saio.sa_restorer = NULL;
   sigaction(SIGIO,&saio,NULL);

   fcntl(fd, F_SETOWN, getpid());
   fcntl(fd, F_SETFL, FASYNC);

   tcgetattr(fd,&oldtio);
   newtio.c_cflag = BAUD | CRTSCTS | DATABITS | STOPBITS | PARITYON | PARITY | CLOCAL | CREAD;
   newtio.c_iflag = IGNPAR;
   newtio.c_oflag = 0;
   newtio.c_lflag = 0;
   newtio.c_cc[VMIN]=1;
   newtio.c_cc[VTIME]=0;
   tcflush(fd, TCIFLUSH);
   tcsetattr(fd,TCSANOW,&newtio);
   write(fd,"T",1);
   while (STOP==FALSE) {
       status=1;
       if (status==1) // so redundant...
		{
	if(DEBUG){
   		write(fd,"P",1);
		printf("Printed Pn");
	} else {
		// 7 - single a d conversion to host on current settings
		// z 3 bytes (both channels x and y of accelerometer)
		// s - 7 bytes (all 7 channels)
		// 8 - streaming a/d conversion data using current settings
   		write(fd,"z",1);
	}
	} 

         if (wait_flag==FALSE)  //if output is available
	{
		res = read(fd,buf,255);
		if (res>0)
		{

			// Print serial output
			for (i=0; i

OPDS: building an ebook catalogue

This is part of a series wrapping up (belatedly, alas) the findings from Project Sunflower. As the protagonists of the Project have moved on to pastures new, leaving their notes behind, editorial duty has fallen to yours truly.

In this post, we look at OPDS, otherwise known as ‘Open Publication Distribution System’, and why it’s worth a look for anybody intending to integrate ebook platforms into the student experience. For anybody who’d rather skip ahead, version 1.1 of the standard can be found right here.

OPDS is, according to the specification, designed as

a syndication format for electronic publications based on Atom and HTTP

and can

enable the aggregation, distribution, discovery, and acquisition of electronic publications

using

existing or emergent open standards and conventions, with a priority on simplicity.

Now, as we will see from reviewing the performance of typical embedded ebook search/indexing functions and interfaces, most ebook readers aren’t designed to contain huge numbers of ebooks. At 7.99 an ebook, most readers will be cautious in their acquisitions, so perhaps the perception from some manufacturers is that it is pointless to create readers that specialise in navigating across hundreds of thousands of files. Many portable media devices suffer from similar difficulties – the classic ‘clickwheel’ interface on iPods, as applied to a large number of files, became the subject of a 2009 satirical report by The Onion.

The relevance of OPDS is the following: OPDS allows you to search and browse across extensive collections of documents. They don’t need to be books; an OPDS frontend on an institutional repository is perfectly achievable, format conversion notwithstanding. The obvious use case is searching or browsing for a single file, but part of the relevance of OPDS is the fact that it also allows for batch mode: a student downloading the full reading list for the semester, for example. Wouldn’t that be convenient?

An OPDS catalogue is fairly straightforward to set up. For prototyping purposes, the well-known ebook software Calibre can be used to experiment with the concept; it can be found in the Calibre software under Preferences->Network->Sharing over the net, and is referred to as a ‘Content Server’. If you’d rather experiment with a static OPDS catalogue — providing no search function, but with browse functions that make full use of your metadata — consider trying calibre2opds, a Java application that renders your Calibre catalogue as a set of static HTML pages and, being simpler and more secure (by dint of having very few moving parts), may be considered a relatively secure way of deploying a prototype. A comparison of these alternatives may be found here.

Cross-platform compatibility: Limited.

Android and the iPad approach this on a per-application basis, and a good implementation is available for both. iBooks won’t handle the catalogue functionality, but you can manually type the address into Safari; then, when you click on an ePub file, iBooks can handle the download. Alternatively, you can use Stanza, which works well – but when iOS 5 came out, we discovered that Stanza ceased to work until we updated the iPad to the latest version, so be prepared for sudden failures around the time of iOS upgrades.

The Kindle is able to use OPDS catalogues, but requires them to run on port 80 (the usual port for a web server, admittedly, but not Calibre’s preferred choice for practical reasons). Simpler e-Ink devices mostly still do not have any mechanism for connecting to the Web, and therefore this sort of functionality is not available on the platform itself, so desktop software must be used instead.

Ease of setup: Moderate.

Getting a Calibre content-server running on a home network is relatively easy provided that the user is familiar with terms like ‘IP address’. However, practical implementation on a larger scale requires significantly more thought; not only are there security and sustainability issues around the software, but the usability of the resulting catalogue is very dependent on good metadata.

Benefits

Standard, relatively simple to set up, and extremely liberating – a convenient distribution channel, bypassing the need to centralise via a commercial vendor, what’s not to like?

Disadvantages

Support for OPDS is patchy and the standard is still relatively recent. Many popular ebook reader applications do not support it explicitly. Fortunately, it’s so near to popular standards that all you really need is a web browser and an ebook reader to get some benefit from an OPDS.

Sample screenshots

Browse by tag screenshot

Browsing the Calibre content server by tag

 

Browse by author screenshot

Browse by author

AI-Class with tablet devices

Quote from Sebastian Thrun

@SebastianThrun: Who’s up for a $2000 Stanford degree?

You might have seen the intense publicity received by Stanford’s current experiment: Ai-Class, not to mention the sibling efforts ML-Class and DB-Class. These were described to the public as beta-releases of a new kind of education, and have been made available for free, possibly a once-in-a-lifetime offer, possibly never to be repeated. Class began in mid-October, and it’s not clear whether these will run again in their current form.

I joined two classes; AI-Class (artificial intelligence, taught by Sebastian Thrun and Peter Norvig) and ML-Class (machine learning, taught by Andrew Ng). Given that the midterm exam happens next week, I won’t be sharing my grades, but I would like to write a little about accessing these courses on various platforms.

First, a confession: despite the fact that the AI-class draws extensively on material from Russell & Norvig’s ‘Artificial Intelligence: a modern approach’, and the fact that I would’ve liked to use this to check out some ebook reader platforms, I haven’t been able to do so. There are various reasons for that, but the most compelling is :

Content Unavailable in the United Kingdom

Oh well.

There were other problems, anyway; the price of Norvig’s other books suggest that I would not have been happy to pay the price for a Kindle copy. Keep in mind that the office wouldn’t be paying; this is something I’m doing in what I laughably refer to as ‘spare time’. Norvig’s cheapest available Kindle download, Case Studies in Common Lisp, costs £41.89. If AI:AMA cost anything like that, I’d have ended up checking out the second-hand market anyway – you can pick up a second-hand copy for between a fiver and a tenner. Even if I’d bought a paper copy new it may have been cheaper; e-books attract VAT.
This got the Kindle out of the running very quickly. The primary use it can be put to during the course is revision of notes from the ML-class, which conveniently includes revision slides/PDFs.

That left the Apple iPad and Motorola Xoom, which could not only view the PDFs, but also access the videos offered by each site. In the case of ML-Class, a download link was even provided for each video – perfect, I thought, I’ll download them and watch the videos in transit. One difficulty: the iPad seems to disapprove of the concept of downloading files. Safari will consent to send pdfs to iBooks, but as for storing videos for later review, the obvious solutions involve a laptop and iTunes. If you are not always online, the need for advance planning – the faff factor, if you like – increases rapidly. The determined can mitigate the problem via applications for the iPad such as the MyMedia download manager, but the app-centric viewpoint is frustrating. Stanford could solve this through iTunes U – but how many channels must a provider support?

The Xoom did not go to the same finishing school as the iPad, if it went to one at all. Unaware that saving files from the browser and displaying them in anything available is an uncouth habit, it simply does it. It also seems to have passed through its formative years without learning that arbitrary soft-resetting is rude, so it occasionally does that as well.

ML-Class makes extensive use of Octave, a free and fairly Matlab-compatible language and interpreter, giving weekly assignments. The idea of Octave on a mobile device is not as far-fetched as it sounds – Nokia N800/810 owners were able to use both Octave and Gnuplot. Similar software packages, such as Addi and Mathmatiz, are available for Android. In general these are works in progress. iPad owners with a desktop copy of Matlab can try connecting to it remotely via Matlab Mobile, a function that is available through unofficial apps on Android. The interface is not, however, optimised for the iPad, and as with the problem of watching videos in transit, those with limited network connectivity will find this an imperfect solution. Why no Octave clone on iOs? The App Store, the GPL, and extensible interpreters apparently don’t mix, although since Apple changed the language in their SDK, some of the issues mentioned have been resolved.

To conclude: the iPad is polished, but I found myself reaching for the (heavier, clunkier) Android device instead. The Xoom is indeed something of a brick, but the iPad seems to be designed for a world with uniformly excellent 3G coverage, in which nobody ever spends much time offline.

Project Sunflower: XOOM Usability Study

The Motorola XOOM is the first tablet to run on Android 3.0. It supports 720p recording and boasts an Nvidia Tegra 2 1GHz processor. The XOOM was introduced as a tablet that does a lot of things, one of which is eBook reading. Our aim was to study the eBook reading capabilities of the device. We studied the reading experience, the device itself and the UI the device had to offer from a purely eBook reading perspective.

Device

The first thing noticeable about the device, or should I say not noticeable, was the power button. The power button was nowhere to be seen on the sides of the device. Users often mistook the SIM card slot for the power button. This was an issue with all users. The power button is on the back of the device, besides the camera. It isn’t easily identifiable.

The XOOM weighs 1.6 lbs, slightly more than iPad and Kindle that weigh at 1.3 lbs and 1.2 lbs respectively. This was another concern shown by users. The users pointed out that the impact of the weight was clearly evident through stress in the wrists when holding the device.

The thickness of the device is also not comparable to the iPad 2 and Kindle DX, the two other devices used for the study. The users thought a thinner device would be more convenient. The greater thickness however, did provide for slightly better grip.

The keyboard feels too broad when holding the device in landscape mode making it difficult to type.

User Interface

The users liked the eBook reading experience the app had to offer. The pages were displayed across the entire screen not wasting space at the edges and thus displaying more words per page in portrait mode. Settings provided by the app were also deemed adequate by users.

The most admired feature was ”Night mode’. This feature allows users to change the screen to white on black from black on white. This makes it more comfortable to read in low-lighting conditions and especially at night. This feature is an advantage because the backlit display can cause severe stress to the eyes when reading continuously for a long time.

The areas users generally found tricky were finding applications to read books on the device. Previous experience with the device played a significant role in this case. The users with little or no experience found it difficult to find and install apps. Most users wanted the app to be installed by default instead of requiring the user to install it.

The landscape view does not support 2-page display, causing almost 2 inches of screen space being wasted on either sides of the screen. This space could be better utilized to display more text and thus help users to see more information on the same screen.

The most severe issue was that of crashes. In case of some users, the app crashed abruptly and the user was taken back to the homescreen.

Bottomline

The Motorola XOOM is a powerful device and runs the latest Android 3.0 OS, however as far as eBook reading goes, is not a very suitable option. Especially for academic text. The device’s weight. thickness, abrupt crashes, and the ePub format’s illustrations rendering capabilities deems it unsuitable for reading academic text. Like most other tablets, the XOOM is good for leisure reading with its simple UI, various viewing modes and fast responsiveness. Academic text on the other hand requires more information displayed on a single page, the ability to flip through chunks of pages while being able to see the scrolled contents and the ability to make notes on the textbook. It will take more time till eBook readers support these features and as of now the Motorola XOOM does not seem ready for use as an academic textbook reader.

Project Sunflower: Kindle DX Usability Study

The Kindle DX is the only dedicated eBook reader from the devices we are using for the study. It has an E-Ink Pearl display and was made with the sole purpose of comfortable and convenient reading. The first generation Kindle had a big launch in 2007, where all the Kindles were sold out in five and a half hours. The Kindle stayed out of stock for five months. These figures tell a lot about its popularity and people’s interest in reading on the device.

We studied the Kindle from point of view of academic text. We studied the reading experience on Kindle DX, the user interface it offers, and the device in general.

Device

The users were really happy about the fact that it was lighter than any other tablet they had held in their hands.  The fact that it is lighter than most other devices is true, however saying its weight makes it an ideal eBook reader is not. The users did have problems with the weight of the Kindle DX. Some users that had used other Kindles previously said that the bigger screen on the  DX was a great advantage, but the addition to the weight worked against that. The users were comfortable using the smaller Kindle than buy the more costly, heavier Kindle DX for a bigger screen.

The E – Ink Pearl display made a mark on all users. The users were very impressed with the fact that there was no glare from the screen, and the absence of brightness adjustments to be made to the screen to adapt to ambient light.  The screen was perfectly readable in varying lighting conditions. The screen felt good, and mimicked paper.

The problems mostly faced were with the buttons on the device. Users complained the keys on the keypad were too small, and found holding the device and typing at the same time uncomfortable as the keypad was too low on the device. The fact that there are no dedicated numeric keys added to this factor. The 5-way stick was difficult to identify for the first time, and making selections was difficult until the users realized the 5-way stick could be pressed in to make a selection. The device has navigation buttons on the right side only, which makes it mandatory for people to hold the device either in the right hand, or use another hand to flip pages when holing it in the left. The ‘Back’ button and the button to navigate through a book were misleading. Users mistook the ‘Back’ button for page navigation, however it is for navigating through and to menus and not for in-book navigation. Some users also expressed the need of a ‘Forward’ button as the slow response rate may cause repeated actions causing unwanted results. The Menu button was also misleading. as users thought they could change settings in-book using the Menu button. There is a dedicated key for settings on the keypad. This key too, is difficult to identify the first time.

User Interface

The users liked the simplicity of the UI, as all the books were displayed on the Homescreen. This made it very easy to find a required book on the device.

The Kindle offered a number of font sizes to aid the user. It also has a text-to-speech feature. That being said, the text-to-speech isn’t as advanced as one might expect. It is like any other text-to-speech software you may have tried using. The software  sounds fairly automated and loses expressions, which are key to any book or story alike.

The fact that it was not a touchscreen and did nothing but read eBooks was seen as an advantage. The lack of a touchscreen and other features caused less distractions to users and readers spent time reading instead of anything else.

The main concern shown by all users was the responsiveness of the UI. Common tasks like unlocking the device, opening a book and flipping a page took a long time due to the slow refresh rate. Talking from an academic texts viewpoint, fast refresh rate is one of the most important attributes an eBook reader should possess. When reading textbooks, most people flip through chunks of pages to retrieve relevant information. A task that seems impossible at a very slow refresh rate.

Bottomline

The Kindle is great for linear reading, but its currently not suitable to be used to read academic text. The refresh rate is too slow to allow for fast flipping to and from pages. The limited illustrations rendering capabilities and weight are also a problem. The Kindle, due to its low weight and E-Ink display may be really well suited for leisure reading, but it might take some time till one can use the Kindle DX to replace textbooks.

 

Project Sunflower: iPad Usability Study

The iPad since its launch has been promoted primarily as a web-surfing device. Its eBook reading capabilities came with applications that rendered eBooks on the iPad. Our usability study tested the iPad from an eBook reading point of view. More so, from the point of view of academic texts. We tested the eBook reading experience the iPad has to offer, the user interface of iBooks, the settings it allows the users to alter, and the device in general.

Device

Most users were very happy with the design of the device, and particularly liked how thin it was. That being said, the flip side is that they were not very happy with the weight of the device (despite being 15% lighter than its predecessor), and complained that their hands would hurt after a certain amount of time when using the device to read. When reading from the device for a significantly long time, one starts to feel the edges, especially when held in one hand.

The most common concern that all participants raised was that they all wanted the iBooks app installed by default instead of having to install it separately to be able to read eBooks. I admit this isn’t a lot of work, but isn’t the whole point of eBook readers allowing the user to get access to books as fast as possible? Inexperienced users did not know much about applications and their installation.

The screen feels good to read, however exposing your eyes to an LED-backlit display for a really long time isn’t a good idea. Especially in low-lighting conditions.

User Interface

The users were particularly impressed with the responsiveness of the touchscreen. They liked the way the device registered the tap exactly where they intended, and did exactly what they wanted it to do.

Users that had previous experience using iOS devices were more comfortable operating the device than others that had never used iOS devices before.

iBooks renders the book in a very graphical way to make it look not like plain text, but more like an actual book. This feature, however, costs almost an inch of space from each side. Space that could be utilized to fit more content on a single page, allowing the user to read more on a single page, saving some time from the reduced page flips.

Bottomline

From a purely objective viewpoint, I’ll go ahead and say the iPad has a supercool UI and great responsiveness, however, when it comes to eBook reading, these features don’t really count. Its backlit LED display and weight make it a ‘not so ideal’ eBook reader when it comes to academic text. The device is useful for leisure reading, but it may take some more time before we see students using the iPads as textbooks leaving their 2000 page hardback textbooks at home. One of the main uses of a textbook is to refer to a particular formula, diagram or search a particular concept as soon as possible. The ePub format’s limited Math rendering capabilities coupled with the inability to write all over the book and flip through chunks of pages at a time does not affect leisure reading, but makes it not so suitable for academic use.

Project Sunflower: Usability Study

As part of our eBook usability study, this part deals with studying the devices from the eBook reader point of view. All three devices,  Apple iPad 2, Amazon Kindle DX and Motorola XOOM have eBook reading capabilities, with Kindle being a dedicated eBook reader.  The aim of the study was to analyse the ease with which a user can perform a particular task on each device, the user-friendliness of the UI and the eBook reading experience the device has to offer. Two studies were devised for the purpose of our research. One study aims at understanding the user experience the devices have to offer in general, and the second study aims at understanding the eBook reading experience.

Internet access was enabled for all devices for the purpose of the study, as connecting to the internet is not part of the eBook reading activity.

Study 1

The study was implemented in two phases, the difference being the instructions given to the user.

Phase 1

In this phase, the devices were connected to the internet, and the users were asked to download and open an eBook on the respective device. They were not told about specific apps that were needed to render eBooks, and were given no specifics whatsoever. The users were not given any instructions so as to get a firsthand view of where they try to get the eBooks from, whether they even know about the requirement of specific apps to render eBooks on the devices and of any other OS specific functions.

This study helped evaluate whether prior experience with the OS played a significant role in understanding OS specific requirements such as apps, the app stores the devices used, and the place to get eBooks from.

Phase 2

In this phase, the users were given more specific instructions about the applications that they would have to download to be able to read eBooks in the ePub format. This test helped answer questions such as, did the user know where to get the application, which application to get, did they have trouble installing the application, how to download eBooks on the device, and so on.

This study gave a very clear understanding about the intuitiveness of the UI, the difficulty or ease in performing tasks, and whether previous experience with either similar devices or the operating system played a part in performing the given task.

Study 2

This study was devised to evaluate the eBook reading experience each of the devices had to offer. The participants of the study gave feedback on the overall device design from point of view of an eBook reader, the user-friendliness of the user interface from the eBook reading point of view, and inputs on the in-book settings the devices allowed the users to change.

In this study, the users were asked to inspect two areas of the eBook reader or eBook reading app. First, the overall readability of eBooks was tested by asking the users to read a book for ten minutes on the device. The eBooks were rendered at default settings. This part of the test was to get feedback on the eBook reading experience the device offers. For the next part of the test, the users were asked to find and change the settings they wished to change when reading, and also inspect the settings the device offered. For this part of the study, each user was given five minutes. This dedicated time to change settings allowed the users to find all or most settings the software offered, and identify settings the software lacks or are unnecessary.

Cc image by Astragony

Project Sunflower: Devices for Research

There are a large number of eReaders currently available in the market. We have chosen three devices, one with an E Ink display and the other two with LED displays, each running on a different operating system. Amazon Kindle DX, Apple iPad 2 and Motorola Xoom are three devices we will be using. The Kindle DX runs on Linux, iPad on iOS and the Motorola Xoom on Android 3.0.

 

Amazon Kindle being a dedicated eBook reader has capability to read eBooks by default, without requiring the installation of an eBook application. iPad and Xoom being tablet PCs primarily, require an additional application to be installed that allows the device to render eBooks. We will be considering the native applications that are developed specifically for the device.

Apple iPad

iBooks is the default application for reading eBooks on the iPad. It is free to download from the Apple App Store, and allows in-app purchases. The iBookstore has over 200,000 eBooks available for purchase, with some free ones. There are other eBook apps too, such as the Kindle app and many more.

Motorola Xoom

Google Books is the default application for reading eBooks on Android devices. However, due to publisher restrictions, Google Books is not available to users in UK (yet). The Kindle app for Android works just fine, though you need to have an Amazon account. The other eBook apps rated highly in the Android Market (Android’s App Store) are mostly paid.

Amazon Kindle DX

The Kindle is a dedicated eBook reader. Books are directly displayed on the homescreen, where you can start reading immediately. You can purchase books from the Kindle Store. Most of the books also have a free sample that Amazon wirelessly transfers to the device, allowing you to read the beginning of the book and then decide whether to buy it or not.